From owner-freebsd-questions Thu Dec 27 10:33:47 2001 Delivered-To: freebsd-questions@freebsd.org Received: from mobil.cz (diana.mobil.cz [195.39.16.12]) by hub.freebsd.org (Postfix) with ESMTP id EE69937B419 for ; Thu, 27 Dec 2001 10:33:40 -0800 (PST) Received: from ester.mobil.cz (ester.mobil.cz [194.213.62.23]) by mobil.cz (8.11.6/8.11.0) with ESMTP id fBRIXdf26663; Thu, 27 Dec 2001 19:33:39 +0100 Received: from roman.mobil.cz ([10.2.0.89]) by ester.mobil.cz (Lotus Domino Release 5.0.7) with ESMTP id 2001122719320782:3447 ; Thu, 27 Dec 2001 19:32:07 +0100 Received: (from roman@localhost) by roman.mobil.cz (8.11.6/8.11.6) id fBRIgPh04234; Thu, 27 Dec 2001 19:42:25 +0100 (CET) (envelope-from neuhauser@mobil.cz) X-Authentication-Warning: roman.mobil.cz: roman set sender to neuhauser@mobil.cz using -f Date: Thu, 27 Dec 2001 19:42:25 +0100 From: Roman Neuhauser To: Jason Halbert Cc: questions@freebsd.org Subject: Re: Moving MySQL Databases Message-ID: <20011227194225.J476@roman.mobil.cz> Mail-Followup-To: Jason Halbert , questions@freebsd.org References: <20011227174410.D399637B41C@hub.freebsd.org> Mime-Version: 1.0 In-Reply-To: <20011227174410.D399637B41C@hub.freebsd.org> User-Agent: Mutt/1.3.23i X-MIMETrack: Itemize by SMTP Server on ester/Mobil(Release 5.0.7 |March 21, 2001) at 12/27/2001 07:32:07 PM, Serialize by Router on ester/Mobil(Release 5.0.7 |March 21, 2001) at 12/27/2001 07:32:13 PM, Serialize complete at 12/27/2001 07:32:13 PM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > From: Jason Halbert > To: questions@freebsd.org > Subject: Moving MySQL Databases > Date: Thu, 27 Dec 2001 17:42:29 +0000 > > 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. As long as both servers understand the format of the tables (MyISAM, whatever), you can just: 1) stop both servers 2) copy the database directories from server 1 to server 2 (put them in the same dir where you have the other databases) 3) start the servers the target server should now "automagically" know about the databases. oh, and this of course assumes you don't use InnoDB, in which case you'll have to transfer the transaction log... but I don't remember the details. -- FreeBSD 4.4-STABLE 7:37PM up 1 day, 6:15, 6 users, load averages: 0.00, 0.00, 0.00 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message