Can't connect to MySQL database on server

I can't seem to connect DataGrip to my MySQL database on that server.

Here's my current configuration in Data Sources:

Anything special that I need to do?
Thanks!

12 comments

@Linus Hi,

Possbily, you need to use SSH tunneling or SSL to connect to your server.

Thank you.

0

Hey @valisychernov, I tried doing that. I filled in all the data under 'use ssh tunneling'. Can't connect.

0

@Linus Hi,

Could you attach any logs or errors? Since everything looks fine. How do you connect to your server from other tools?

Thank you.

 

0

Hi,
What requirements do you have for connection?

There are "Connection refused" and "Connection is closed by foreign host" errors in your log file. It means, that you're not allowed to connect, set up wrong connection parameters or configured your server incorrectly.

Thank you.

0

Uhh requirements as in ...?
I can connect using the same host, user and password using SSH via Terminal. Not sure why it wouldn’t work for DG.

0

Hi,
You need to configure your data source connection to use SSH. See SSH/SSL tab:


See online help https://www.jetbrains.com/help/datagrip/connecting-to-a-database.html#connect_via_ssh for additional information.
Thank you.

0

Hey, 

Should I use the known-hosts file? I put `~/.ssh/known_hosts` as the private key file but it says 'ERROR: SSH: invalid privatekey'

Thanks!

0

Please sign in to leave a comment.