I'm currently running Ubuntu 13.04 and MySQL 5.5. I have been using InnoDB, and the default location for installation. The problem is that my main OS partition is fairly small (36GB), and I need to move my database to my 2TB drive.
I'm trying to change MySQL datadir from:
but I've been running into all kinds of problems. MySQL refuses to start, and generally tells me there are problems with permissions. This doesn't make any sense to me, though. Here is what I have tried doing:
I copied the files:
cp -R /var/lib/mysql /path/to/new/directory
Updated the permissions:
chown -R mysql:mysql /path/to/new/directory
/path/to/new/directory/ r, /path/to/new/directory/** rwk,
I make sure to reset Apparmor:
service apparmor restart
But it still gives me errors. I am not sure what else I need to do. Does anyone have a definitive guide to making this work under Ubuntu 13.04, MySQL 5.5, and InnoDB?