I’m (re)installing MySQL 5.5.23 on my Mac (Snow Leopard) and since I have two volumes, one with much more space than the boot volume, I’d like to configure it to write all its data to the bigger volume instead of to the boot vol.
I tried moving the data dir to my other volume and using a symlink to it from the installation directory, but I wasn’t able to set the ownership of the symlink to the same ownership as the directory originally had … and MySQL no longer starts. I can’t find logs to see what happens when it tries to startup, but I assume it dislikes something about my present arrangement.
Anybody have experience making this work?
ETA: I found this in my macbook.local.err file:
120423 13:01:21 [ERROR] /usr/local/mysql/bin/mysqld: Can't find file: './mysql/host.frm' (errno: 13)
120423 13:01:21 [ERROR] Fatal error: Can't open and lock privilege tables: Can't find file: './mysql/host.frm' (errno: 13)
...
^G/usr/local/mysql/bin/mysqld: Can't find file: './mysql/plugin.frm' (errno: 13)
120423 14:16:55 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
Edit MySQL’s
my.cnffile so that it’sdatadirvariable (the data directory, usually/var/lib/mysqlon Linux machines) is set to a folder of the new volume.