I'm attempting to change the datadir of a fresh MySQL install. After changing the datadir, MySQL will no longer start. It doesn't give any reasons, it simply says [fail]. When I change the datadir back to the default (/var/lib/mysql), MySQL starts fine. Ultimately, I would like the datadir to be a folder on a different partition and disk, but for testing purposes I have tried using a folder on the same partition and disk (/home/jeremy/test) but cannot get it to work.
Things I have tried:
- Following the directions in this thread, to the letter.
- Copying the files from /var/lib/mysql to /home/jeremy/test and running chown -R mysql:mysql on the folder. I've also tried various permutations of permissions and ensured the permissions and owners match exactly between the 2 directories.
- Both copying and not copying the ib_log* and ibdata* files.
I've also made sure that mysql is stopped before making any changes to any files whatsoever. Once again, this is a fresh install with nothing created. It starts/works fine when the datadir is set to the default but not when I change it to anything else.
Any help is greatly appreciated!