Tuesday, January 25, 2011

Communication Link Failure - Mysql

Recently I have been trying mysql with Hibernate. After setting the classpath with all related jars, I am puzzled to see communication link failure error while trying to connect from Hibernate.

Finally when I tried netstat -a, I found mysql was listening at port 3336 where as the default port is 3306. After changing connection url in the hibernate-cfg.xml with port entry, all are working fine. Bad thing is it took some 2 hours to find out that the port is the real curprit. Hummmmmm learning with time.