I was not able to find how to configure MySql data source settings to enable an SSH database connection (instead of using the classic IP based connection) in my Spring / Hibernate persistence context. Here is my definition of persistenceContext.xml datasource bean:
<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 section of the persistence.properties file in which these properties are defined (this only works with an IP connection):
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 must be more properties to configure an ssh connection, such as database.ssh.url and database.ssh.username , or something similar. Do you know how to do this?
source share