
1. Make a full mysqldump file
# mysqldump --opt -uroot -proot_password > /tmp/mysqldump
2. Uncheck monitor in WHM > Service Manager for Mysql and save the area
3. Stop MySQL service
# /etc/init.d/mysql stop
4. Ensure that the following settings are present
check file /etc/systemd/system/mariadb.service.d/homedir.conf
[Service]
ProtectHome=false
ProtectSystem=off
5. Make the directory for MySQL in /home, move it and symlink it:
# mkdir /home/var_mysql
# mv /var/lib/mysql /home/var_mysql
# chown -R mysql:mysql /home/var_mysql/mysql
# ln -s /home/var_mysql/mysql /var/lib/mysql
6. Remount CageFS system-wide:
# cagefsctl --remount-all
7. Start MySQL:
# /etc/init.d/mysql start
I like it whenever people get together and share thoughts.
Great blog, stick with it!