• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to connect a web APP to a remote DB through hibernate over SSH

 
dinesh sati
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,

I have a test web application.
and have a remote MySQL DB, which I can access through TCP over SSH at my sql workbench.

I have local db and I am able to connect local DB through Hibernate API.
But not able to connect Remote DB as its require SSH user name and password other than DB user/password.
and not found any option in hibernate.

could you please help me how can I use ssh username/password in hibernate config file.

Thanks in advance.

Regards,
Dinesh C Sati
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch.

It's likely to be slow to open an SSH connection every time you need to make a DB call (and Hibernate is notorious for wanting to make lots of DB calls). Have you considered creating a permanent VPN connection to that remote machine, so that Hibernate can access the DB directly via its VPN IP address?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic