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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to duplicate a database on mysql?

Status
Not open for further replies.
Apr 30, 2003
56
US
I am fairly new to mysql. It took me a while just to login to the database. Anyway, long story short. My mysql version is 4.0.18. I have a database in mysql called commerce. I need to make an exact copy of this database (with all the tables, etc) and call the new database commerce2. How can I achieve this? I am trying to find a step by step guide on google with no luck. I am hoping that I will get some help from this forum. Thank you very much.
 
I forgot to add one thing is that I am copying the database within the same server, not from one server to the other. I just want to make a copy and not to delete the original commerce database. Thanks.
 
dump the database using the mysqldump utility

change the name of the database in the sql file

run the sql file

:)

r937.com | rudy.ca
Buy my new book Simply SQL from Amazon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top