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

How to import "mysqldump" file into different database? 1

Status
Not open for further replies.

DeepDiverMom

Programmer
Jul 28, 2003
122
US
We have successfully used "mysqldump" to create backup files for our databases on our mysql installation. We wish to test the quality/integrity of our dump files by importing a dump file into an empty database having a name different from the original source database from which we created the mysqldump file.

Can someone offer an example of a command we would use to restore a dumpfile into a database different from the original source database?

Thanks,

Becca
 
Run the dump file into MySQL: mysql database < dumpfile.

Check the dumpfile first for any "use" statements, which you'll want to remove or change to use a different database name.
 
L,

Woo-hoo !!! Worked like a charm ! Have a Purple Star.

Becca
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top