Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Connect through ssh tunnel to mysql

I am trying to connect to a remote server using ssh tunnel connection where I have to use port forwarding from a local server to the remote server. I then need to be able to connect to a mysql database on the remote server.
Any ideas how I would set this up in Talend?
Any help would be appreciated.
Labels (3)
14 Replies
Anonymous
Not applicable
Author

Sorry the error is made by me jens.fricke's solution worl fine 0683p000009MACn.png 0683p000009MACn.png 0683p000009MACn.png
Anonymous
Not applicable
Author

Hello -
Been trying to do the same, however, we have differences as follows:
1. Using Talend 6.2.1 on Windows 10
2. Linux Server (RHEL 7 MySQL Package) separate from DB server
Goal is to setup DB connection from local PC (using Talend) to MySQL via SSH connection: Local PC -> SSH Connection (e.g. mdmuser/<password>) -> MySQL DB (e.g. talend_mdm_dev/<password>).
It is necessary to connect to Linux server first before accessing DB server.
cacak
Contributor
Contributor

Hello -
Been trying to do the same, however, we have differences as follows:
1. Using Talend 6.2.1 on Windows 10
2. Linux Server (RHEL 7 MySQL Package) separate from DB server
Goal is to setup DB connection from local PC (using Talend) to MySQL via SSH connection: Local PC -> SSH Connection (e.g. mdmuser/<password>) -> MySQL DB (e.g. talend_mdm_dev/<password>).
It is necessary to connect to Linux server first before accessing DB server.

Please describe the components you added in Talend Jobs.
I want to connect via tssh, but i dont know about the command or anything more.
cacak
Contributor
Contributor

hi
Never use "localhost" for hostname (but 127.0.0.1) if ssh host and mysql server on the same machine

Hope it helps
regards
laurent

How is your components structure?
I have a structure : tSSH-----(main)---tFlowToIterate---(Iterate)---tMysqlInput-----(main)----tFileOutputExcel
And the result is nothing, just connected for a long time.
tSSH: Host (My servers IP Public), Port (22), User (myuser), auth method (public key),
          Commands : "mysql -u root -p myDBName"
                           "myrootPass;"
tMysqlInput: Component Setting like localhost conection, with host 127.0.0.1

When i ran only the tSSH component with command "ls;", its running weel.
Hope somebody can help me to fix it.
cacak
Contributor
Contributor

And i can execute those command (mysql -u root ip DBName) and some select query via PuTTY