服务器mysql 版本和mysql-connector-java

2018-04-20  本文已影响0人  cubotudo

报错误信息

org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (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.)

原因:本地测试连接的mysql数据库版本5.7,生产上用的还是老版本的mysql 5.6,包冲突了

解决:

pom.xml

mysql mysql-connector-java 5.1.9

改成5.1.40

上一篇 下一篇

猜你喜欢

热点阅读