Copying/Cloning database in Datagrip(MySQL) Copying/Cloning database in Datagrip(MySQL) database database

Copying/Cloning database in Datagrip(MySQL)


There can be two ways.

  1. 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.

enter image description here

  1. 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.

enter image description here