Thursday, June 9, 2011

How to import a mysql database?

Dump your source database to a file using
mysqldump --database <databasename> -h <server> -u <username> -p > c:\dump.sql

Enter password when prompted.

Now execute the script in the target using
source c:\dump.sql

No comments:

Post a Comment