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

标签: mysql, database, storage, path, change

添加新评论