Jump to content

How to make a ssh connection to a mysql Database?


robert.groll
Go to solution Solved by marianol,

Recommended Posts

Hello everyone,

my question is how can i make a tcp/ip over ssh connection to use my mysql-Database.

I tried it with a Scriptet. The Scriptlet uses the command line with plink.exe(this is a command line version of PUTTY) and are right implemented.

But the method beforeReportInit() does not start before the report starts the MySQL DataAdapter. I ask me, why? Can I execute Java code before

connecting to the DataAdapter?

I'm looking forward to get a helpful answer. Thanks in advance for your help.

Robert

Link to comment
Share on other sites

  • Replies 9
  • Created
  • Last Reply

Top Posters In This Topic

  • Solution

Jou just need to follow the instruction of the mySQL DBC driver on using SSL connections http://dev.mysql.com/doc/connector-j/en/connector-j-reference-using-ssl.html just make sure that when you  import the MySQL server CA Certificate into a Java truststore, you are importing it in the JVM that Tomcat is using, and remember to add 'ssl=true' to your JDNC URL

It will probably be better to use JNDI, it may simplify your configuration and you will benefit form the Tomcat Server Connection Pooling

Link to comment
Share on other sites

Sorry,

but I think it doesn't word in that way. In that way I pass these Parameters(truststore-Data, keystore-Data) to the Database, but there has to be possibility to talk to the MySQL-Server. Previously there has to be a ssh-Tunnel, before I can pass Parameters to the MySQL-Server.

Are there maybe other ideas.

Thank you for more help in advance.

Kind Regards

Link to comment
Share on other sites

  • 3 weeks later...

Have a look at Jaspersoft AWS ssh connection to mysql - one of the staff answered my question there. You need to go to a terminal prompt, then use ssh to establish a local port that is tunnelled through to a remote port. then set the local data source on to that local port for JDBC. He refers to http://community.jaspersoft.com/jaspersoft-aws/connect-emr option #2.

Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...