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!

1
12 comments
Avatar
Permanently deleted user

Where do I find the logs?

0

Help → Show logs in Finder

 

0

@Linus Hi,

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

Thank you.

0
Avatar
Permanently deleted user

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
Avatar
Permanently deleted user

Here's the new logs after updating to DG EAP:

https://www.dropbox.com/s/akaj4lupbzg9mqr/idea.log?dl=0

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
Avatar
Permanently deleted user

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
Avatar
Permanently deleted user

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

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.