Options

"Connecting to a database through SSH tunnel"

jeganathanvelujeganathanvelu Member Posts: 17 Contributor II
edited June 2019 in Help
Hi,

I want to connect to a remote database via ssh tunnel through rapidminer studio installed in my laptop. Requesting for guidance on how this should be configured in Manage Database connections menu in Rapidminer.

I have information in the following way

ubuntu server stack IP : xxx.xxx.x.xxx:22
remote system user : user
remotesystem pwd : pwd
mysql hostname on remote system : localhost
mysql user name and pwd


If this is not feasible, are there alternate ways to connect Rapidminer studio to a database through SSH tunnel.

Thanks and Regards,
Jegan.
Tagged:

Answers

  • Options
    BalazsBaranyBalazsBarany Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert Posts: 955 Unicorn
    Hi!

    First, you need a tunnel to the remote system with a port forwarding. You can start SSH this way:

    ssh -L 13306:localhost:3306 user@xxx.xxx.x.xxx:22

    13306 is the port which you'll connect to. 3306 is the database server port on the remote server (in this example, MySQL). "-L" means "listen on local port and forward it to the remote machine". If you use Putty, you can enter similar port forwardings in the connection setup window.

    In RapidMiner, you simply add a new database connection with Host = localhost and Port = 13306. As long as the SSH tunnel is open, this connection will work.
Sign In or Register to comment.