Cannot connect to Mysql using java jdbc Driver -
i building application in tomcat 7, using spring data , hibernate. have working on mac, when ported application on linux server, , changed configuration match mysql login, connection exception on tomcat startup.
a couple differences between development environment (where works) , production environment(where doesn't work): -development mac, production linux -development mysql version: ver 14.14 distrib 5.6.16, osx10.9 (x86_64) using editline wrapper, production mysql version: ver 14.14 distrib 5.5.37, debian-linux-gnu (x86_64) using readline 6.2
hibernate.properties looks this:
hibernate.dialect=org.hibernate.dialect.mysqldialect hibernate.connection.driver_class=com.mysql.jdbc.driver hibernate.connection.url=jdbc:mysql://localhost:3306/<dbname> hibernate.connection.username=root hibernate.connection.password=<root password>
one weird thing on linux box, mysql doesn't show when typing netstat command, can log in command line no problem. when in mysql, typed "show variables;" , port came 0. tomcat still couldn't connect when put port hibernate properties though.
can create database <dbname>
mysql command line? sure mysqld running correctly? mean port came 0?
how deploy application tomcat? use tomcat7 debian package or one? message exception exactly?
Comments
Post a Comment