MySQL Change default directories
While reading this heading everybody things like, yeah its pretty old topic, we can get many articles by googling. But you know what sometimes well known things never work for us. This time it happened for me, my bad. I have done this many times. But most of us changed the default Data Directory only. Only a few of us thinking about change MySQL default data,binlog, error log directories.
I can easily change the Data directory, But while enabling binlog, and error log I got an error.
So this is the reason for wrote this blog.
My Server Setup:
OS: Ubuntu 14.04LTS 64Bit
Create the Directories:
Sync the data from old data directory to the new directory.
Edit the my.cnf file
Now its time to modify the apparmor files.
Thats it, now start mysql.