Hello,

if partition "/" where /var/lib/mysql is located is low on disk space, one can move mysql folder to another/bigger partition or on another server

Basically its about stopping mysql, copying data and then creating symbolic link from old location to new location..

See the free disk space in various locations:
Code:
df -h
if /home has enough space, you may create dir in /home/mysql
Code:
mkdir /home/mysql
set proper permissions to that directory
Code:
chown mysql:mysql /home/mysql
2 times execute copying data from old to new location
Code:
rsync -vrplogDtH /var/lib/mysql/ /data/mysql/
stop mysqld:
if WHM server is in place make sure mysql is not auto-restarted by your control panel (Untick WHM/Service Configuration/Service Manager mysql monitoring)
then:
Code:
/etc/init.d/mysqld stop
copy data again:
Code:
rsync -vrplogDtH /var/lib/mysql/ /home/mysql/
rename old mysql directory and instead add symlink to new location:
Code:
mv /var/lib/mysql /var/lib/mysql.old;ln -s /home/mysql /var/lib/mysql
start mysql
Code:
/etc/init.d/mysqld start
if any error, put it into google..

How to move mysql to another server with fast HDD? Probably with help of rsync and scp. Then after coppied, stop source mysql, do second rsync, change mysql server to the remote server.