Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Sep 2004 16:40:01 -0400 (EDT)
From:      Jerry McAllister <jerrymc@clunix.cl.msu.edu>
To:        bsilver@chrononomicon.com (Bart Silverstrim)
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Moving MySQL database
Message-ID:  <200409082040.i88Ke1L27271@clunix.cl.msu.edu>
In-Reply-To: <F582A04F-01CB-11D9-8444-000D9338770A@chrononomicon.com> from "Bart Silverstrim" at Sep 08, 2004 03:19:09 PM

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

> On Sep 3, 2004, at 10:46 AM, Jerry McAllister wrote:
> >> 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.
> <snip>
> > If you don't want to move all the stuff in /var/db, then you will
> > have to be more selective and make the link from within /var/db
> > rather than just the whole db directory from within /var.
> >
> > For example, the MySQL stuff is likely to all be in a directory
> > called /var/db/mysql.   So:
> >
> > Stop MySQL or reboot to single user.
> > Then
> >      cd /var/db/mysql
> >      tar cf /usr/mysql.tar *
> >      cd /usr
> >      mkdir var.db.mysql
> >      cd var.db.mysql
> >      tar xf ../../mysql.tar
> >      cd /var/db
> >      mv mysql mysql.old
> >      ln -s /usr/var.db.mysql mysql
> > Now, reboot and let MySQL start and make sure it all is happy and
> > works just fine.
> > Then clean up.
> >      cd /usr
> >      rm mysql.tar
> >      cd /var/db
> >      rm -rf mysql.old
> >
> > ////jerry
> 
> Thank you to everyone who replied.  I followed the above steps and the 
> SQL server seems to be happy and running on the /usr partition instead 
> of /var for now.  We'll be watching it, and if all seems to be working 
> well, we'll delete the old data off /var.
> 
> Thanks again! (especially for the specific directions on moving the 
> data over, Jerry...)

Good.  I am glad it works for you.
It seemed to be shorter and more clear to just make an example than
to try and write out an explaination for it. 

////jerry

> 
> -Bart
> 
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
> 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200409082040.i88Ke1L27271>