Chriskuei Keep calm and code on

Change MySQL Data Directory

Stop MySQL

sudo systemctl stop mysqld

Backup Data Directory

sudo cp -arp /var/lib/mysql /var/lib/mysql-old

Copy Data to New Location

sudo cp -arp /var/lib/mysql /data

Remove Original Data

sudo rm -rf /var/lib/mysql/*

Edit /etc/fstab File

echo "/data/mysql /var/lib/mysql none bind 0 0" >> /etc/fstab

Mount

sudo mount -a

Restart MySQL

sudo systemctl start mysqld