mysql - Openshift DB connection issue -
i'm trying connect mysql db in openshift application below ,
new drivermanagerdatasource("jdbc:mysql://localhost/dbxxxx?autoreconnect=true", "usernamexxx", "pwdxxx")
;
however error thrown
om.mysql.jdbc.exceptions.jdbc4.communicationsexception: communications link failure
the last packet sent server 0 milliseconds ago. driver has not received packets server.
any idea , whats reasonn
if scaled application, need supply port, won't 3306. otherwise try restarting mysql cartridge, or try sshing gear, , use "mysql" command see if can connect, try using environment variables connection instead of actual values. also, localhost wrong, ssh gear , run "env | grep mysql" , see values should use.
Comments
Post a Comment