Reputation: 321
How can I copy a schema to another schema I've created in Datagrip, essentially creating a clone of the original. For some reason my CMD prompt is not set for MySQL, and I have not found the way to do it via the Datagrip user interface.
Upvotes: 19
Views: 26834
Reputation: 2933
Step 1: Choose the database which you want to clone.
Step 2: Right click => SQL Scripts => Generate DDL to Clipboard.
Step 3: Create a console file in destination DB => Paste DDL from the clipboard to it.
Step 4: Run all scripts.
Upvotes: 12
Reputation: 10345
There can be two ways.
my_sqldump
. Context menu of the schema -> Export with mysql_dump. After that, on your new schema go to Context menu -> Restore with mysql_dump.Upvotes: 7