cd /var
du | sort -n
cd /home
mkdir mysql
chown mysql:mysql mysql
cd mysql
perl -pi -e 's/mysqld=ON/mysqld=OFF/' /usr/local/directadmin/data/admin/services.status
/sbin/service mysqld stop
cp -Rp /var/lib/mysql/* .
cd /var/lib
mv mysql mysql_old
ln -s /home/mysql ./mysql
/sbin/service mysqld start
perl -pi -e 's/mysqld=OFF/mysqld=ON/' /usr/local/directadmin/data/admin/services.status
#once satisfied that mysqld is running and functioning correctly, remove the old data:
rm -rf mysql_old
/usr/local/directadmin/conf/mysql.conf
if you want, but shouldn't be required if you've correctly created the symbolic link with the above "ln -s" command.[Warning] Can't create test file /home/mysql/server.lower-test
after you've moved it to /home, check the given processes mariadb.service or mysqld.service file for:ProtectHome=true
and change this to false.