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
Comment actions Permalink

Where do I find the logs?

0
Comment actions Permalink

Help → Show logs in Finder

 

0
Comment actions Permalink

@Linus Hi,

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

Thank you.

0
Comment actions Permalink

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

0
Comment actions Permalink

@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
Comment actions Permalink

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
Comment actions Permalink

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
Comment actions Permalink

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
Comment actions Permalink

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
Comment actions Permalink

Hi,
 `~/.ssh/known_hosts` is not a private key.

Read more here https://en.wikibooks.org/wiki/OpenSSH/Client_Configuration_Files

Thank you.

0

Please sign in to leave a comment.