现象:客户端连接服务器端mysql是没问题的,所有都木有问题,应用程序配置也没问题,但是连接就抛异常:
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.
死活修改都不ok,google后,将:
<!--mysql --> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>5.1.9</version> </dependency>
版本修改为:5.1.14就OK了。不知道为什么,先mark一下。
mysql连接com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure