Remote database connection through vpn

I'm trying to connect to a remote database with SSH,
I'm using openvpn to connect to the network of the target machine.

This worked when I was directly connected to that network,
but it doesn't with VPN.

My settings are:
Database URL:

(jdbc connector, user and password are OK)

SSH settings are:
Use SSH tunnel:
SSH tunnel will be opened on localhost ( and port:
  32443 (tried with several other high ports)
Proxy host: (this is the address of the target machine in the target network I'm connected to through openvpn)
  22 (default)
(proxy user and auth are OK)

(not 100% sure about these two, are they relative to the above proxy host?)
Remote DB host:

PyCharm tries to connect to localhost,
if I insert the mysql credentials for my localhost mysql server it connects to it (even though "use SSH Tunnel" is checked).

Am i missing something?

The target database is MariaDB, but i don't think that's the problem since I could connect when directly connected to that network...

the port in the Database URL must be the same as in SSH Tunnel port,


Please sign in to leave a comment.