Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Dec 2001 18:16:04 +0000
From:      Scott Mitchell <scott.mitchell@mail.com>
To:        Jason Halbert <jason@jason-n3xt.org>
Cc:        questions@FreeBSD.ORG
Subject:   Re: Moving MySQL Databases
Message-ID:  <20011227181604.K1003@localhost>
In-Reply-To: <20011227174410.D399637B41C@hub.freebsd.org>; from jason@jason-n3xt.org on Thu, Dec 27, 2001 at 05:42:29PM %2B0000
References:  <20011227174410.D399637B41C@hub.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Dec 27, 2001 at 05:42:29PM +0000, Jason Halbert wrote:
> Does anyone know how to move MySQL databases from one box to another? 
>  I am upgrading my server and I would like to move my Qmail and 
> Apache databases over.  It would be a nightmare to have to recreate 
> them from scratch.
> 
> Thanks for any help.
> 
> Jason
> jason@jason-n3xt.org

If it's the same version of MySQL on both boxes you can simply copy the
database files to wherever the new setup wants them to be... obviously shut
both MySQL instances before trying this :-)  I've done this myself, moving
to a slightly later version, with no problems whatsoever.

If the versions are sufficiently different that the new install can't read
the old database files (I've no idea how back-compatible MySQL's files are)
there are some tools in the MyQSL distribution for exporting and importing
databases, that will probably do what you want.  They're documented in the
online manuals as mysql.com, although I've never tried them myself.

HTH,

	Scott

-- 
===========================================================================
Scott Mitchell          | PGP Key ID | "Eagles may soar, but weasels
Cambridge, England      | 0x54B171B9 |  don't get sucked into jet engines"
scott.mitchell@mail.com | 0xAA775B8B |      -- Anon

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




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