Monday, June 11, 2012

MySQL: Dumping a DB with Create DB Statement

Use the -B option e.g.

mysqldump -u username -p -B --result-file=filename.sql dbname

Note: You may run into this "gotcha" while restoring:
http://rstechjournal.blogspot.sg/2012/05/mysql-gotcha-after-restoring-database.html

No comments:

Post a Comment