Move MySQL database to /home directory

Hi,

My default /dev/sda1 disk is full already. I plan to move MySQL database to /home dir (other disk) to free the space. Could you please tell me how to do it with Webmin/Virtualmin? Do I need only change the config?

Thanks, Giang Anh

Status: 
Active

Comments

Normally, MySQL keeps it's data in /var/lib/mysql.

What you could do is move that directory into /home, and then make a symlink that points /var/lib/mysql to /home.

Then, you don't need to make any MySQL changes at all.

Note that MySQL would need to be stopped while doing the above process.