changing mysql data folder
My data drive is only 10GB and my mysql data folder is getting rather big. So I want to move the /var/lib/mysql folder to /data2/mysql. So I did, no problem, everything copied. Then I found that /etc/my.cnf has the datadir parameter, so I changed it to reflect to the new path.
But when I try to start mysql, I get this (and there's nothing in the syslog) Code:
borg:~# ser mysql start Is there perhaps something else I need to edit as well? |
Did you check the permissions in the new directory, i.e. make sure that it's rw for the user under which priviledges mysqld is running. Else you can create a symlink to see if it helps:
Code:
ln -s /data2/mysql /var/lib/mysql |
Funny as I had the exact idea of creating a symlink, and that did not work either. But it was in fact a permission issue as they were owned by root and not mysql and only had rwx for user. So I changed the owner to mysql. Thanks for that tip as I did not even think of checking that.
|
Glad that I've helped
Cheers |
All times are GMT -5. The time now is 03:53 PM. |