[Gllug] Backing-up / Moving a MySQL database

Jason Clifford jason at ukpost.com
Tue Sep 24 08:09:03 UTC 2002


On Mon, 23 Sep 2002, Xander D Harkness wrote:

> The packages come with some lovely scripts so that you can install the 
> database without knowing anything about MySQL :-)
> 
> I have just discovered that a new server is being built in the next few 
> days to take this software.
> 
> As many of the users have entered their data, I was wondering how easy 
> it is to move the database.  Is it a matter of copying a couple of files?

It's even easier than that. Use the mysqldump command to create a full 
backup of the database including both schema and data and then on the new 
server simply read that into the mysql CLI client like this:

oldserver$ mysqldump databasename > database.dump

newserver$ mysqladmin create databasename 
newserver$ mysql databasename < database.dump

If your users have mysql accounts you'll need to migrate those over as 
well.

Jason Clifford
-- 
UKPOST.COM	 	           get your @ukpost.com address now...
http://www.ukpost.com/	 	   professional hosting and colocation


-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list