mysql and SSH port tunneling forwarding

One Star

mysql and SSH port tunneling forwarding

Hello, I have been evaluating talend as means to perform various ETL tasks and have been very impressed with the capabilities of the tool. One common need that I have will be accessing remote MySQL Databases via port forwarding / tunneling.
Does anyone have recommendations / experience on the best way to setup this capability within talend?
Regards,
- John
Employee

Re: mysql and SSH port tunneling forwarding

I have a permanent SSH tunnel which maps local port 12345 to remote port 3306:
$ ssh -L12345:localhost:3306 remote_user@remote_host

In TOS, in a Perl project, I set the remote host to '127.0.0.1' (and not localhost, it doesn't work) and port to 12345. I do it everyday and it works fine.
One Star

Re: mysql and SSH port tunneling forwarding

Thank you very much for the reply.
I have been experimenting with a permanent ssh tunnel, however the issue that I have seem to run into is connection reliability. This is mostly due to corporate access policies that are outside of my control. Because of this our connection tends to get severed periodically throughout the day.
I am trying to come up with a way that I could open and close the tunnel when making requests to the database giving me the ability to trap and restart jobs as connectivity issues arise. A way to have a dependency on a tunnel initiated from within Talend would be the ideal, but I'll take any suggestions.
Thanks again.
- John
Employee

Re: mysql and SSH port tunneling forwarding

Can you confirm you're working on an Unix? so that I can investigate the right way.
One Star

Re: mysql and SSH port tunneling forwarding

Currently I am working on Windows, but only for the purpose of experimentation. I am very satisfied with the Talend Open Studio and its capabilities and will be moving to a Linux Box for complete testing and deployment within a week or so. Linux will be the platform the of choice that this application will be running on.
I really appreciate your taking the time to investigate this.
- John
One Star

Re: mysql and SSH port tunneling forwarding

Hi,
Do you see a possibility to establish such a tunnel on the fly, e.g. using the Talend ssh component?
Alex
One Star

Re: mysql and SSH port tunneling forwarding

i am also trying to connect to a mysql server in an environment that uses ssh tunnels. I have a putty terminal open, but i am also tunneling to the svn. seems like there is some confusion, and in the past they have just copied full copies of DB to their machines to get around the issue. i would rather get this working correctly so that going forward development is more efficient.
any suggestions would be very helpful.
One Star

Re: mysql and SSH port tunneling forwarding

Hi, also interested in a tutorial and/or a built in connection option to deal with MySQL SSH
Plegall, perhaps you could elaborate on your technique?
I am on a Mac
Thank You Smiley Happy
One Star

Re: mysql and SSH port tunneling forwarding

I have now also read about something called Karaf which pertains to ssh, as well as some other information from this page:
https://help.talend.com/search/all?query=Connecting+and+disconnecting+remotely&content-lang=en
Can this be applied to connecting remotely using ssh? It seems to indicate so
Are there any tutorials anywhere on this or using any other method?