Mysql vs /var partition...
Barry Byrne
barry.byrne at wbtsystems.com
Thu May 26 10:45:30 PDT 2005
> -----Original Message-----
> From: owner-freebsd-questions at freebsd.org
> My mysql database is growing, it has subsequently filled the /var/db
> partition to capacity.
> I tried moving the mysql dir and symlinking it to /var/db/mysql which
> didn't work. I also tried mount_null from the /usr partition to the
> /var/db/mysql folder...in both instances, the mysql server
> will not start.
> Is there another way around this problem or do i need to
> somehow resize
> my /var partition?
Matt:
Most likely a permissions problem. I generally create a new directory on a
different partition for the mysql data. You might want to use tar to
preserve your permissions Something like this should work:
Enusre mysql server is stopped
mkdir /data/mysql
chown mysql:mysql /data/mysql
chmod 700 /data/mysql
cd /var/db/mysql
tar cf - . | ( cd /data/mysql ; tar xvf - )
mv /var/db/mysql /var/db/mysql.old
ln -s /data/mysql /var/db/mysql
Restart mysql
Check the ownerships/permissions of the existing /var/db/mysql to be sure of
what you need.
- Barry
More information about the freebsd-questions
mailing list