java - connect to google cloud sql using Hibernate -


i have created google cloud sql instance , able connect using mysql client machine.

but when try connect using jdbc driver per below properties

<property name="hibernate.connection.driver_class">com.mysql.jdbc.driver</property> <property name="hibernate.connection.url">jdbc:mysql://<ip-of-instance>:3306/<dbname>?zerodatetimebehavior=converttonull</property> <property name="hibernate.connection.verifyservercertificate">false</property> <property name="hibernate.connection.requiressl">true</property> <property name="hibernate.connection.usessl">true</property> 

i getting below error

com.mysql.jdbc.exceptions.jdbc4.mysqlnontransientconnectionexception: not create connection database server. attempted reconnect 3 times. giving up. @ sun.reflect.generatedconstructoraccessor26.newinstance(unknown source) 

i using same username , password using in mysql client locally.

is there missing ?

jdbc connector -> 5.1.38


Comments

Popular posts from this blog

account - Script error login visual studio DefaultLogin_PCore.js -

xcode - CocoaPod Storyboard error: -