MySQL Forums
Forum List  »  Install & Repo

pointing datadir to a mounted device
Posted by: Matt Lawton
Date: October 16, 2008 02:00PM


I need to change the default data directory for a new installation of mysql 5.0. The default is /var/lib/mysql, and everything works using this datadir. However, after shutting down mysqld I copied the files from this directory to a directory on a mounted disk, making sure the file owners and modes were all retained, then changed /etc/mysql/my.cnf to have datadir = new directory on mounted drive. When I try to restart mysqld (using mysqld_safe), or when I reboot, mysqld fails to start because a test to see if it can write to the datadir directory fails. I know this by checking the syslog.

As far as I can tell, the ownership and file permissions are exactly the same for the new directory as for /var/lib/mysql. If I change /etc/mysql/my.cnf to point datadir back to /var/lib/mysql it works fine. Is there something about using a mounted device that is not the root device that is not allowed?? Any other suggestions?

Thanks in advance,

Options: ReplyQuote

Written By
pointing datadir to a mounted device
October 16, 2008 02:00PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.