Eureka Moment Wiki

One eureka moment at the time

User Tools

Site Tools


database:mysql:move_data_folder

Relocate MySql data folder

rsync -avzh /var/lib/mysql /data
mv /var/lib/mysql /var/lib/mysql.bak
mkdir /var/lib/mysql
mount -B /data/mysql /var/lib/mysql

Additionally

/etc/fstab
/data/mysql     /var/lib/mysql  auto    defaults,nofail,nobootwait,bind 0       2

Discussion

Enter your comment:
B Q J E W
 
database/mysql/move_data_folder.txt · Last modified: 2020/02/21 10:34 by tplecko