Search code examples
javajdbcexectunnelplink

Running jdbc on top of multiple port forwarding


When I want to access the database, there is an architecture through which I need to tunnel my connection. So, when I have to use a GUI tool like MySQL Workbench, i have to open three Putty sessions. I am trying to do the same using Java. So I am using Runtime exec to run plink. This is working fine, I am able to establish the connection and send some unix commands to it and retrieve the output. I want to run jdbc on top of it. Is it possible. Since, the putty sessions are running in the background, do the port forwarding rules apply to the jdbc I will be running?


Solution

  • Yes it will run if you set up the tunnels correct.