Scenario: As the amount of data increases, the disk where MySQL is located is full, and the data needs to be moved to a disk with larger space. method: 1. Shut down the mysql service service mysqld stop 2. Move the data directory to a disk with larger space cp -a /usr/local/mysql/data/ /home/mysqldata/ -a: equivalent to -pdr (parameters pdr are: retain permissions, copy the soft link itself, recursive copy); 3. Modify the configuration file my.cnf ... sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES basedir = /usr/local/mysql #datadir = /usr/local/mysql/data datadir = /home/mysqldata/data #log-error = /usr/local/mysql/data/mysql_error.log log-error = /home/mysqldata/data/mysql_error.log #pid-file = /usr/local/mysql/data/mysql.pid pid-file = /home/mysqldata/data/mysql.pid #socket =/usr/local/mysql/data/mysql.sock socket = /tmp/mysql.sock port=3701 ... 4. Start the mysql service service mysqld stop Summarize The above is the Centos7 mobile mysql5.7.19 data storage location introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! You may also be interested in:
|
<<: A brief discussion on the alternative method of $refs in vue2 in vue3 combined API
>>: Introduction to the use and disabling of transparent huge pages in Linux
Table of contents 1.1 Java environment as a prere...
This article mainly introduces 6 solutions to the...
I started learning MySQL recently. The installati...
Preface MRR is the abbreviation of Multi-Range Re...
Table of contents Introduction Instructions Actua...
Recently I saw the article Build your own React o...
1. css: dragTable.css @charset "UTF-8";...
background There is a requirement in the project ...
1. Related concepts 1.1 Jenkins Concepts: Jenkins...
Nowadays, whether you are working on software or w...
When we are writing projects, we often encounter ...
Table of contents Preface Browser compiled versio...
1. Download the tomcat image docker pull tomcat:8...
This article example shares the specific code of ...
Table of contents Step 1: Install node_modules in...