DataGrip database backup, file import and export

Export file

1. For example, we want to backup the test database

2. Mouse click test, right click

3.选择dump with 'mysqldump'

1. Modify the Out path to the location where you need to back up,

2. Here I select the mysql folder of the F drive. The backup file name can be customized,

3. Add -d and space in front of the last line ( -d means as long as the table structure does not require data, if you need data, remove -d )

4. Export completed

5. View the file

------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Importing files

1. First create a database name that needs to be imported

Such as: test2

You can see that there is no table in test2, and the test we exported earlier contains a table

2. Right-click the table test2 to be imported

3. Select the file we exported earlier and click run

4. Refresh the database

Import succeeded

 

 

Published 115 original articles · Like 58 · Visits 160,000+

Guess you like

Origin blog.csdn.net/luChenH/article/details/103087735