How DataGrip can export and restore entire database data, using a single SQL file

How DataGrip can export and restore entire database data, using a single SQL file

I have been using Navicat to process database data before, the entire export and import, etc. After getting used to it, I can't find the corresponding operation with DataGrip. For example, it took me a long time to find the entire import and export of the database.

1. Exportmysqldump

1. Locate the database to export

right click, selectexport with 'mysqldump'

insert image description here

2. Find the installed database directory in the system and select mysqldump.exethe file

In the pop-up window, Path to mysqldumpyou need to locate and select the
insert image description here
insert image description here

3. The export is successful

You can see that the exported file name in the above screenshot is an example of the file name after {data_source}-{timestamp}-dump.sql
the export is successful:diary_kylebing_cn-2022_07_28_11_09_15-dump.sql

After clicking Run

insert image description here
Export succeeded
insert image description here

4. The content of the final exported file is as follows

insert image description here

2. Restore from SQL file

official description

https://www.jetbrains.com/help/datagrip/import-data.html#restore-a-full-dump-for-mysql-and-postgresql

1. Select Restore from 'mysql'

Right-click the database you want to restore data to and select theRestore from 'mysql'
insert image description here

2. Select the corresponding mysql file

Locate the mysql.exe file to be used in the pop-up window, and use this file to restore the database content

insert image description here
Select the sql file to restore and confirm

insert image description here
then it worked

at last

I know that most junior and middle-level Java engineers want to improve their skills, and they often try to grow by themselves or enroll in classes. However, the tuition fees of nearly 10,000 yuan for training institutions are really stressful. The effect of self-study is inefficient and long, and it is easy to hit the ceiling and stagnate in technology!

Therefore, I collected and sorted out a " Complete Set of Learning Materials for Java Development " and gave it to everyone. The original intention is also very simple, that is, I hope to help friends who want to learn and improve themselves but don't know where to start, and at the same time reduce everyone's burden.

The editor has encrypted: aHR0cHM6Ly9kb2NzLnFxLmNvbS9kb2MvRFVrVm9aSGxQZUVsTlkwUnc==For security reasons, we have encoded the website through base64, and you can decode the URL through base64.

Guess you like

Origin blog.csdn.net/m0_67265464/article/details/126801691