Don't forget to copy the my.cnf file, and make any changes neccesary (due to different directory/disk structures).

If you are using InnoDB, and can shut down the database, you should just be able to move the files in

data/<database name> or var/<database name>

like Mark said below (InnoDB stores files there as well).

Also, in the my.cnf, look to see if any datafiles are specified. If so, you need to move those files, plus the log files to the new server.

David

Mark Pittam wrote:

-----Original Message-----
From: David Barron [mailto:[EMAIL PROTECTED]
Sent: 06 August 2004 14:56
To: [EMAIL PROTECTED]
Subject: Moving a database

Good morning,

What's the best way to move a database and all of its tables from one
server to another?

Thanks




You can use the mysqldump utility to dump the database you want to move.
Then use the dump file to recreate the database in the mysql instance
running on your other server.

If you are using myisam tables and are able to shutdown your servers you
can copy all the files in the data/<database_name> directory into a
directory of the same name in the data directory of your new server. Be
sure to copy all the files (.MYD, .MYI, .frm)

Regards
Mark






--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to