21 Aug
2014
21 Aug
'14
4:51 p.m.
Can I move entire DB to another disk?
Like this? : 1. Stop the daemons 2. Rename the DB folder "mv /var/lib/mysql /var/lib/mysql-tmp" 3. Recreate the folder "mkdir /var/lib/mysql" 4. Mount the new disk to the new folder "mount -t ext4 /dev/sdb1 /var/lib/mysql" (put in fstab after) 5. Copy the files from the old folder to the new folder (cp mysql-tmp/* mysql/) 6. Restart the daemons.
And voila???
Thanks,
Benoit