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
This article uses examples to describe the common...
Monitoring method in Vue watch Notice Name: You s...
In this project, the Docker container is used to ...
In the past few years, I have been moving back an...
Table of contents introduce Key Features Effect d...
If a form field in a form is set to disabled, the ...
Table of contents 1. Synchronization Principle 2....
1. Installation version details Server: MariaDB S...
I have written many projects that require changin...
Table of contents 1. What is virtual dom? 2. Why ...
Originally, this seventh chapter should be a deep ...
Given a div with the following background image: ...
The SQL JOIN clause is used to join rows from two...
CSS: 1. <link type="text/css" href=&q...