Moving MySQL database
Bart Silverstrim
bsilver at chrononomicon.com
Fri Sep 3 06:43:03 PDT 2004
I have a server that is rapidly filling the var partition with a MySQL
database. I'd like to move it to a subdirectory somewhere under /usr.
Is there a document that would outline a "best practices" approach to
doing this? My first instinct was to stop the mysqld, do a mv on
/var/db to /var/db2 to rename it, copy the data to a /usr/local/db
folder and alter permissions on it to match /var/db, then make a
softlink between /usr/local/db and /var/db and restart mysqld so mysqld
wouldn't need any reconfiguring and everything, I would *think*, should
keep working...only now it will be working off a far more spacious
partition.
Thanks,
-Bart
More information about the freebsd-questions
mailing list