Move cpanel mysql to other directory safely

This is also for my personal need in the future whenever i setup a cpanel server for my TWOPIZ HOSTING. There is a way to move mysql to other directory other than the one defined by cpanel. Firstly, you will need to backup everything on /var/lib/mysql folder. Once you have done that, you will have to follow the below instruction.


cd /var/lib
service chkservd stop
service mysql stop
mv mysql /home
ln -s /home/mysql mysql
service mysql start
service chkservd start

The backup apps will still work normally as the mysql folder still exist on /var/lib just that now it is pointing to the /home directory where the size is the largest.