Access remote mySQL DB via SSH without use of PortForwarding/Tunneling

Hello!

I'm trying to access a remote mySQL Database instance via SSH, without the use of Port-Forwarding/Tunneling. I've been doing some googling, but I'm getting the impression Java isn't capable of something like this?

Would anyone have any ideas if there are some libraries which might make this possible?

Thanks

Posted Feb 11, 2016, 10:41 PM UTC

15
juckele•

access a remote mySQL Database

Cool.

via SSH

Okay...

without the use of Port-Forwarding/Tunneling

Um....

the impression Java isn't capable of something like this

Wait...

Would anyone have any ideas if there are some libraries which might make this possible?

What are you trying to do? I mean, what do you want to do (not how do you think you should try to do it)? You don't need to SSH to a box to use a database in a Java program. JDBC can connect to a SQL database without using SSH (and it will be significantly easier for you to connect to your database through JDBC than through an SSH tunnel). Perhaps this SO question gets your going in the right direction: http://stackoverflow.com/questions/4093603/how-do-i-find-out-my-mysql-url-host-port-and-username

3
the_hoser•

I'm not sure how you intend to use SSH to connect to a MySQL database without using port forwarding, regardless of language.

2
hhbhagat•

perhaps he intends to code up a native library to tunnel traffic. So in this case, he can interface with a TAP adapter and route all traffic through ephemeral ports

1
BuildingBlocksOP•

Thanks to everyone who offered advice/info!

Seems like this was a big misunderstanding for our IT, but we've discussed and gotten everything sorted out

1