Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 May 2003 14:00:07 -0500
From:      "Kevin Kinsey, DaleCo, S.P." <kdk@daleco.biz>
To:        "BSD baby" <bsdlap@hitmedia.com>, "Ian Barnes" <ian@cerebellum.za.net>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Mysql
Message-ID:  <008f01c32614$87ee5210$5041d5cc@nitanjared>
References:  <PPECLBJKHADMJKGPJMEFCEBDCKAA.ian@cerebellum.za.net> <20030529161618.GA95757@mail.hitmedia.com>

next in thread | previous in thread | raw e-mail | index | archive | help
From: "BSD baby" <bsdlap@hitmedia.com>
To: "Ian Barnes" <ian@cerebellum.za.net>
Cc: <freebsd-questions@freebsd.org>
Sent: Thursday, May 29, 2003 11:16 AM
Subject: Re: Mysql


> > 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
>
There is also "mysqldump" with complete instructions
at the mysql.com website.  IIRC, it creates SQL language
files that would be used to entirely recreate the database
from the commandline once the new server is up & running.

HTH,

Kevin Kinsey
DaleCo, S.P.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?008f01c32614$87ee5210$5041d5cc>