Unable to connect to mysql through JDBC connector through Tomcat or externally.
Posted
by iftrue
on Server Fault
See other posts from Server Fault
or by iftrue
Published on 2009-12-01T22:14:30Z
Indexed on
2010/03/15
20:30 UTC
Read the original article
Hit count: 419
I've installed a stock mysql 5.5 installation, and while I can connect to the mysql service via the mysql command, and the service seems to be running, I cannot connect to it through spring+tomcat or from an external jdbc connector.
I'm using the following URL:
jdbc:mysql://myserver.com:myport/mydb
with proper username/password, but I receive the following message:
server.com: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. the driver has not received any packets from the server.
and tomcat throws:
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
Which seems to be the same issue as if I try to connect externally.
© Server Fault or respective owner