1. 修改配置文件
datadir=新目录
2. 数据迁移
systemctl stop mysqld
cp -a /var/lib/mysql/* /data chown -R mysql.mysql /data
3. 重启服务
systemctl restart mysqld.service
标签:修改,datadir,systemctl,mysql,data,目录 From: https://www.cnblogs.com/santia-god/p/17325612.html
1. 修改配置文件
datadir=新目录
2. 数据迁移
systemctl stop mysqld
cp -a /var/lib/mysql/* /data chown -R mysql.mysql /data
3. 重启服务
systemctl restart mysqld.service
标签:修改,datadir,systemctl,mysql,data,目录 From: https://www.cnblogs.com/santia-god/p/17325612.html