Bug #72599 MySQL Workbench lacks option to export without schema name
Submitted: 9 May 2014 22:06 Modified: 5 Nov 2014 2:46
Reporter: Alex Man Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: Administration Severity:S4 (Feature request)
Version:6.1.4.11773 OS:Microsoft Windows (7)
Assigned to: CPU Architecture:Any
Tags: export, MySQL, schema, workbench

[9 May 2014 22:06] Alex Man
Description:
It would be very useful if MySQL Workbench can provide the option to export a database without having the schema name in the dump file. In other words, an option not to put

CREATE DATABASE IF NOT EXISTS ...;

and

USE <schema_name>;

in the dump file. The reason is that, as the database grows to a very large size (10+ GB), it's impractical to open the dump file and edit the schema name.

I know it's possible to do it with command line but some users may not have easy access to it if they are using services like Amazon RDS.

How to repeat:
Just export any database using MySQL Workbench

Suggested fix:
I see two options:

- Provide an option to export a database without the schema name
- Provide an option to import/restore a database by letting the user specify the target schema name *which will override the schema name in the dump file* (currently such option exists, but the schema name overrides user's selection)
[5 Nov 2014 2:46] Philip Olson
Posted by developer:
 
Fixed as of the upcoming MySQL Workbench 6.2.4 release, and here's the changelog entry:

A new "Data Export" preference was added that makes the "CREATE DATABASE"
and "USE" statements optional in the generated output.

Thank you for the bug report.