Copying/Cloning database in Datagrip(MySQL)
There can be two ways.
- Reliable and with data, but requires
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.
- Works if your schema does not contain some very specific objects: LOGFILE GROUP, SERVER, SPATIAL REFERENCE SYSTEM, TABLESPACE. And with no data. Go to the context menu of the schema -> Sql Scripts -> SQL generator. There you will see the script to create the schema from scratch. Just run it on your new schema.