Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 May 2003 09:16:18 -0700
From:      BSD baby <bsdlap@hitmedia.com>
To:        Ian Barnes <ian@cerebellum.za.net>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Mysql
Message-ID:  <20030529161618.GA95757@mail.hitmedia.com>
In-Reply-To: <PPECLBJKHADMJKGPJMEFCEBDCKAA.ian@cerebellum.za.net>
References:  <PPECLBJKHADMJKGPJMEFCEBDCKAA.ian@cerebellum.za.net>

next in thread | previous in thread | raw e-mail | index | archive | help
> I want to remove my mysql installation and re-install from scratch. Now the
> problem. I have 6 active databases. How can i make sure that i dont loose
> those. And that when i have re-installed, that they work immediatilly ??

The databases are in /var/db/mysql

The smartest thing would be to do (as root user):

mysqladmin -u YourUsername -p shutdown
cd /var/db/mysql
tar cvfz MyDatabases.tgz *
mv MyDatabases.tgz /home/

That will stop your database server, and save all your data in your /home/ dir.

Then, when you want to restore them, IF they're not there after a new install, just do:

cd /var/db/mysql
rm *
tar xvfz /home/MyDatabases.tgz



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