MySQL database storage path change
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
💘 相关文章
- Implementation method of regular backup of MySQL database
- Personal blog database selection, mysql vs sqlite?
- mysql database connection failed | SQLSTATE[HY000] [2002] Connection refused solution
- mysql 8 修改用户名密码的命令
- buyvm添加块存储Block Storage的方法
- debian 10安装MySQL服务器记录
- Change the user's home directory for centos
- Starting MySQL... ERROR! ……quit without updating PID file (/opt/mysql/data/mysql.pid)解決方法
- mysql定時去重的方法
- Hetzner 備份服務器STORAGE BOXES掛載為目錄的方法