Export/Restore MySQL Data with DataGrip

Hilal Demir
Testinium
3 min readOct 3, 2020

--

JetBrain’s DataGrip is a great IDE for databases as we all know. Recently I had a problem with export/restore MySQL data on MacOS that I could not find any solution fits best for DataGrip although there are many other solutions floating on the internet. So, I am writing this article for my reference and hoping that it will be useful for other users who are facing the same issue.

To restore your data in DataGrip, you need to right click on the database you wish to restore and select Restore with ‘mysql’

Select Restore with ‘mysql’

But, when I did that, I got a box with “Path to executable is wrong” error

Path to executable is wrong

So I learned that you need to specify the exact location of mysql.exe into the Path to mysql box. It is where you download and unzip the mysql files when you setup for the first time. Also you need to export your data to have a dump file in your system.

To export data, right click on the data you wish to export and select Export with ‘myqsldump’

Export with ‘myqsldump’

Next, you need to give exact path to your mysqldump.exe file in your system. It is in the same folder where your myqsl.exe file is. Then you need to specify the output path, you can choose wherever you want. DataGrip will mark your dump file with the data source name and timestamp of the current date automatically.

After you run that, you can restore your data with the dump file whenever you want again using the Restore with ‘myqsl’ without any problems once you specify the paths.

You are now ready to export/restore your MySQL data in MacOS whenever you need :)

--

--