Stop mysql -->
#
service mysql stopMove MySQL files to the target folder -->
# mv /var/lib/mysql/ /targetfolder/
Note: Target folder may be kept on a second hard disk drive
Link the original mysql folders to the new target folder -->
ln -s /targetfolder/mysql /var/lib/
Test that it is working -->
ls -la /var/lib/mysql
Anticipated outcome to be similar to: lrwxrwxrwx 1 root root 16 Jul 2 04:23 /var/lib/mysql -> /targetfolder/mysql/
Start MySQL back up --> service mysql start
That's it - it should be all good now and can be tested by creating a database in an applicable cPanel and see if the folder for new database populates the target folder ... if so your good to go