moving mysql db from machine to machine

unite the cows

Active Member
Jun 26, 2002
29
0
151
Hey fellas, I was curious about something. I am going to be moving some existing mysql databases from one machine to another. Both are on the net of course and I have root to both machine. and root to mysql. what are the best commands to move one database from machine to machine and then install it into mysql once I get it there. Thanks for your help ahead of time. :)
 

phowell

Registered
Jul 26, 2002
3
0
151
answer: mysqldump

mysqldump is very simple to use. try the online mysql documentation (www.mysql.com) or use this tutorial, that explains things nicely.

http://www.devarticles.com/content.php?articleId=62&page=1

Try it once or twice with nonessential (test) tables or databases, depending on your needs. It's also good for backups.
 

TheVoice

Well-Known Member
Feb 7, 2002
105
0
316
here is the exact commands you should use:

mysqldump -uusername -ppassworddatabasename & dumpeddb.sql

This will dumb the data into a .sql file. Move the file onto the other server. Then run this command:

mysql -unewusername -pnewpassowrd newdbname & dumpeddb.sql

and thats about all you need to do. AIM me if you need more help.