-
Open Database view in IntelliJ (
ViewβTool WindowsβDatabase). -
Click + β Data Source β MySQL (or your database type).
-
Fill in the following connection details:
Field Value Host db_private_IPPort db_portAuthentication User & password User db_usernamePassword db_password
-
In the same Data Source Properties window, go to the SSH/SSL tab.
-
Enable Use SSH tunnel.
-
Click ... (Edit) to create a new SSH configuration.
-
Fill in the following SSH details:
Field Value Host public_IPPort public_portUser Create a ssh user ssh_usernameAuthentication type Key pair (OpenSSH or PuTTY) Private key file Any private key file e.g. .ppk -
Click OK to save the SSH configuration.
- Back in the main Data Source window, click Test Connection.
- Wait for IntelliJ to confirm a successful connection.
- If successful, click Apply and OK to save the configuration.
Tips:
To avoid mixing up environments, use different color schemes or naming labels for staging and production connections.