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

💘 相关文章

写一条评论