Database data source: operational databases that contain data (see Connect to a database).
If database files are in your DataGrip working folder, open the Files tool window. Otherwise, open your file manager.
Click File | Export Settings.
In the Export settings window, click Select None.
In the Export settings window, select Database: drivers, Database: settings, and Database: global sources.
In the Export settings to field, type a path to the folder where you want to store the settings.zip file.
The settings.zip file includes only data sources that are available at the global level. For more information about how to change a level, see Change the project level to global.
Click File | Import Settings.
In the Import File Location window, locate the settings.zip file that you exported, and double-click it.
In the Select Components to Import window, select Database: drivers, Database: settings, and Database: global sources.
In the Restart Needed window, click OK to restart your IDE.
Open the Data sources and drivers window, enter necessary connection credentials in the data source properties. If the data source is on a local or network drive, ensure that the path to this data source is correct.
You may copy a data source if you need to use the same data source in another project, but have different requirements to it, such as its accessibility level (project or global), the user, database connection and schema settings, and so on.
Click File | Data Sources (N/A).
In the Data sources and drivers window, select the data source that you want to copy.
Click the Duplicate icon, or press Ctrl+D.
Data sources in DataGrip are available at two levels: project and global. The project level means that you can access a data source only from the project where this data source was created initially. At the global level, a data source is available for other projects. By default, a data source is available at the project level.
To share a data source between different projects inside your IDE, you need to move the data source to the global level.
Click File | Data Sources.
In the Data sources and drivers window, click the Make Global icon ( ) to make the data source available at the global level.
You cannot attach global data sources to projects that you open in other versions of DataGrip.
You can copy information about a data source to the clipboard in the XML format. The resulted XML does not include password information.
You can send the XML snippet to another IDE (in a messenger or by email) and import it.
In the Database tool window (View | Tool Windows | Database), select data sources that you want to copy.
Click Database tools and select Copy Data Sources to Clipboard.
On another workstation, click View | Tool Windows | Database.
In the Database tool window, click the New icon ( ), select Import from Clipboard.
DataGrip stores passwords in the KeePass storage on Windows and in native keychains on Linux and MacOS. You can configure your IDE to store passwords in KeePass (File | Settings | Appearance and behavior | System settings | Passwords).
You can share your project data sources by copying datasources.xml to the desired location. By default, datasources.xml is stored with other configuration files in your project folder. To see a path to your project folder, click File | Open Recent | Manage Projects.
Click the Data Source Properties icon ( ) on the toolbar (or press N/A).