techarticles

Change MySQL Data Directory

In Redhat/CentOS/Fedora MySQL default data directory remains in /var/lib/mysql. Sometimes you need to change MySQL data directory to a new location for many reasons. To change MySQL data directory is an easy task. Here I am showing step by step procedure to change MySQL data directory from its default location /var/lib/mysql to /data/mysql-data