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.
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?