I have been unable to find how to configure the MySql datasource settings to enable SSH connection to the database (instead of using the classic IP based connection) in my Spring/Hibernate persistence context. Here is my persistenceContext.xml datasource bean definition:
<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="${database.driver}"/>
<property name="url" value="${database.url}"/>
<property name="username" value="${database.user}"/>
<property name="password" value="${database.password}"/>
</bean>
And here is my persistence.properties file section where these properties are defined (this works with IP based connection only):
database.driver=com.mysql.jdbc.Driver
database.url=jdbc:mysql://192.168.1.2:3306/db
database.user=root
database.password=password
I think there should be more properties available in order to setup the ssh connection such as database.ssh.url
and database.ssh.username
or something similar. Do you know some way to do this?