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. Introduction to autofs servi...
Preface: Recently, I encountered a management sys...
First install the dependent packages to avoid pro...
If you want to adjust the size and number of Inno...
Step 1: Ensure that MySQL has binlog enabled show...
Table of contents Overview 1. RangeError 2. Refer...
This article example shares the specific code of ...
As shown below: nsenter -t 1 -m -u -n -i sh -c &q...
Table of contents url module 1.parse method 2. fo...
Table of contents Technology Stack Backend build ...
This article example shares the specific code of ...
Table of contents 1. Basic grammar 2. Filter by c...
Preface The database has always been my weak poin...
Table of contents What is pre-analysis? The diffe...
There are many database management tools for MySQ...