Reputation: 25141
I am trying to restore a mysql database / schema, complete with data, to a new, empty database (on the same machine).
Going through the 'Manage Import / Export' menu option in 'workbench' lets me export and restore fine, except I cannot specify a new name for the new database / schema.
Can anyone point out anything Im missing?
The only workaround I can think of is to manually do a search and replace on the '.sql' file it created.
Thanks.
Upvotes: 3
Views: 3918
Reputation: 1426
Have you considered using mysqldump to export your files from the command line and then mysqladmin to create a new database?
mysqldump -u username -p -v olddatabase > olddbdump.sql
mysqladmin -u username -p create newdatabase
mysql -u username -p newdatabase < olddbdump.sql
Upvotes: 6