In IntelliJ idea, you can configure data sources and test your database connection by opening the data sources and drivers dialog box.
You may not be able to use the shortcut key. Although it seems that the shortcut key is shift + enter, it will wrap in IntelliJ idea and move the cursor to the first line.
The following methods can be used:
Double click shift, and then enter data source in action, or shift + Ctrl + a directly.
IJ-data-source-01674×680 34.8 KB
Then select to open the data sources and drivers dialog box.
You can choose to add a data source by clicking the + sign in the upper right corner.
If the selected database does not have a driver installed, ij will prompt you to install it.
As shown in the figure below, the driver is not installed and you need to install it.
Configure the driver
You can select different driver versions. In the driver dialog box on the left, you can define different drivers and install different driver versions for different data sources.
For example, for the MariaDB database.
You can select the driver of MariaDB from the left.
After clicking on the driver version number above, you can choose to install different driver versions.
Then click the application in the window to complete the configuration.