How to implement Mysql switching data storage directory Today, I encountered at work that the partition space where mysql is stored has been used up, resulting in mysql being unable to start normally. For this reason, I had to migrate the data storage directory. 1. Transfer the existing data storage directory to another storage space. Today, it took more than 30 minutes to copy a 50G data file, which was a bit slow. 2. Modify the my.cf configuration file Modify the storage directory [mysqld] datadir=/home/mysql socket=/home/mysql/mysql.sock [mysql_safe] pid-file=/home/mysql/mysqld.pid Added [mysql] socket=/home/mysql/mysql.sock 3. Be sure to pay attention to modifying the permissions of the data storage directory, especially when mysql_safe pid home/mysql/mysqld.pid* ended Similar exceptions Thank you for reading, I hope it can help you, thank you for your support of this site! You may also be interested in:
|
<<: A brief discussion on why daemon off is used when running nginx in docker
>>: A brief talk about React Router's history
React is a JavaScript library for building user i...
VMware12.0+Ubuntu16.04+MySQL5.7.22 installation t...
Uninstall MySQL 1. In the control panel, uninstal...
This article example shares the specific code for...
I was recently working on a project at the compan...
Table of contents Audio transcoding tools princip...
The principle of nginx to achieve resource compre...
This article shares the MySQL precompilation func...
"Grand" are probably the two words that ...
Install MySQL 8.0 docker run -p 63306:3306 -e MYS...
In LINUX, periodic tasks are usually handled by t...
Problem description (environment: windows7, MySql...
To achieve the association of the frame window, th...
Table of contents 1. Register an account on Baidu...
Table of contents Preface 1. bat executes js 2. T...