• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

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

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.

Dinesh C Sati
Posts: 43016
  • 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?
Do not set lab on fire. Or this tiny ad:
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic