Mybatis报错Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException的解决

Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communicat

mybatis程序报错如下:

org.apache.ibatis.exceptions.PersistenceException:
Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

The last packet successfully received from the server was 7,200 milliseconds ago. The last packet sent successfully to the server was 7,195 milliseconds ago.
The error may exist in com/kuang/dao/UserMapper.xml
The error may involve com.kuang.dao.UserDao.getUserList
The error occurred while executing a query
Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
解决方法如下















将URL中的:useSSL=true
改为:useSSL=false


版权声明:本文为weixin_45898928原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。