Move mysql to other disk

Smugg

New member
Joined
Apr 5, 2012
Messages
2
Hello,

in default DA store mysql data in /home/mysql. My sda is getting too slow so i bought ssd disk and mount it as /mysql/. How can i move mysql to new drive ?
 
Hello,

Why don't you mount it as /home/mysql ?

1. Mount ssd disk as /home/mysql-tmp
2. Stop MySQL server
3. Move /home/mysql/* to /home/mysql-tmp
4. Unmount /home/mysql-tmp
5. Mount ssd disk as /home/mysql
6. Start MySQL server.
 
@Jeff,

It's FreeBSD I guess, mysql data on FreeBSD boxes is stored in /home/mysql
 
Then for the sake of completeness, let's add that if you want to save mysql databases to a different disk/partition on CentOS or Red Hat Enterprise Linux, you should instead mount the new disk/partition to an empty /var/lib/mysql mountpoint.

I can't advise for Debian, because I'm not running it; perhaps somone else will add the correct location under Debian to the thread.

Jeff
 
Back
Top