admin avatar

MySQL database storage path change

🕕 by admin





Mysql data storage path modification /

Find the Mysql configuration file

find / -name 'my.cnf'

Edit the following code

datadir = /data/mysql

/data/mysql is the new path directory for mysql data storage.

Copy the original data to the new directory

cp -R /var/data/mysql/* /data/mysql

tips:you should be stop mysql service first





💘 相关文章

写一条评论

Based on Golang + fastHTTP + sdb | go1.18.3 Processed in 1ms