简体   繁体   中英

Pentaho JNDI ssh tunneling Data Integration MySQL

I am trying to access a database server using SSH tunneling , credentials are fine, as i have tested this on MYSQL GUI Client using SSH Tunneling option , i have also just tested this using command line and command line connection to server is also working perfectly using below commands on two command line terminals:

  1. ssh root@192.168.1.1 -L 3307:localhost:3306
  2. mysql -h localhost -P 3307 -u qstats -pPassw0rd stats

But when i try to connect to the database server using pentaho it gives error as

Access denied for user 'stats'@'localhost' (using password: YES)

I then used JNDI and gave the credentials there, but still it does not work, my JNDI settings are as follow:

Asterisk/type=javax.sql.DataSource

Asterisk/driver=com.mysql.jdbc.Driver

Asterisk/user=qstats

Asterisk/password=Passw0rd

Asterisk/url=jdbc:mysql://localhost:3307/stats

Please if someone can help?

You need to initiate the SSH connection separately using CMD to the database server and then try to connect using PDI, and connection will be successful. BUT JNDI still don't work, only direct connection works.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM