How to change the mysql data directory to a new location on linux machine ?
Once there was a requirement to change the mysql data directory to an external hard disk, in order to protect the data even if the server goes down. The default mysql data directory is in location /var/lib/mysql location. For changing the data directory to new location you just have to …