Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Moving MySQL Database

Status
Not open for further replies.

wsanchez2782

IS-IT--Management
Oct 13, 2004
31
US
Hello,

I have to move a MySQL database from one server to another one and all the files that form the website.Basically I'm trying to get some comments and ideas before I do this task.

Best Regards,
William
 
I've had to do this a couple times already. I'm assuming you have shell access. If that's the case put all the data in a file with

Code:
mysqldump -u root -p -A > /path/to/contents.sql

then copy the contents.sql file to the new server and use

Code:
mysql -u root -p < /path/to/contents.sql

This has always worked for me. You will have to set up users and permissions manually though. It never seems to import any of the user and permission data.

D
 
Oops, sleipnir214's post appeared before mine, and yes, you'd need to be using mysql on both machines.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top