Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 3 Sep 2004 09:42:36 -0400
From:      Bart Silverstrim <bsilver@chrononomicon.com>
To:        freebsd-questions@freebsd.org
Subject:   Moving MySQL database
Message-ID:  <1D64B3BF-FDAF-11D8-ABDA-000D9338770A@chrononomicon.com>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1D64B3BF-FDAF-11D8-ABDA-000D9338770A>