remote mysql setup in datagrip which uses one extra server to login

Answered

Hi All,

I want to register my mysql in datagrip,

thing is that when i am doing that in terminal in my mac,

1-i need to connect to a vpn (cisco VPN)

2- open terminal and login to an entrance server kind of u can say

3- then login to the main server

4-then i can able to access my mysql dbs

so how to configure this in my datagrip

is that entrance server is a kind of proxy(no much idea i have in this)

 

Please help

6 comments
Comment actions Permalink

@Patel Hemsagar1994,

Do you have SSH access to your MySQL database server?

1
Comment actions Permalink

yes with ssh i am able to connect to 

1st my entrance login server

then 2nd to my actual server where i have mysql

after then i am loging to mysql

but how to do this all in datagrip

0
Comment actions Permalink

all this i am doing in terminal using ssh

0
Comment actions Permalink

It looks like you need to configure proxy command in your ssh config file and configure DataGrip to use it.


Articles about proxy command and ssh config:

0
Comment actions Permalink

correct me if i am wrong 

this ssh is for my intermediate server

and in the general tab i need to give the details of my sql installed server

 

but in this ssh part auth type should be what(i am giving password as type)

 

in my  ssh tab :

 

[08001] Could not create connection to database server. Attempted reconnect 3 times. Giving up. java.io.EOFException: Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost.

 

this exception is coming

 

0
Comment actions Permalink

The best way is to work with SSH keys and SSH Agent. Below is an example with ProxyCommand and jump host:

Host jumphost
  HostName 192.168.99.100
  User docker
  Port 22
  IdentityFile ~\.ssh\id_rsa1

Host postgres
  HostName 172.17.0.3
  User root
  Port 22
  IdentityFile /home/docker/.ssh/id_rsa1
  ProxyCommand ssh -q -W %h:%p jumphost

0

Please sign in to leave a comment.