Trying to connect to mysql on remote server through ssh
Hello!
Im trying to connect to my mysql-database that sittes on a remote server. The trick is to connect through ssh.
I tryed this in MySQL workbench and it worked fine. I allso tryed it in phpstorm with MySQL Connector/J but i cant find any settings for ssh.
Im beginninge to think that im using the wrong connector library.
Thankfull for shared thoughts :)
Please sign in to leave a comment.
Hi Mikael,
Try this: http://benkstein.net/java/SSHSocketFactory/
Source: http://youtrack.jetbrains.net/issue/WI-4776?projectKey=WI
does it have to go through ssh?
I got connected to a remote mysql using the
"JDBC Driver Files" = mysql-connector-java-5.1.13-bin.jar
under
TOOLS -> DATA SOURCES -> + -> DB DATA SOURCE
There is a link to download the driver.
Attachment(s):
connecting_to_remote_mysql.png
Hello Andriy!
This locks like it should work :)
Should i compile the java class and put it in a jar and then use that jar instead of the original java connector
or should i bundle your class with the connector? And how do i do that?
Thax.
/Mikael
Sorry -- no idea. You may try asking this question in that ticket, maybe the original post author (or one of the devs) can give you some advices.
I don't understand how to use the SSHSocketFactory. I have to create a JAR file and set properties in the Advanced tab?
Where do I have to put that SSHSocketFactory file?
It's nice that DB support is present in PhpStorm, but the way how it's implemented could be improved a lot!