Unable to connect to mysql through JDBC connector through Tomcat or externally.
- by iftrue
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.