首页 > 其他 > 详细

The last packet successfully received from the server was 2,272 milliseconds ago. The last packet sent successfully to the server was 2,258 milliseconds ago.

时间:2020-05-21 19:43:39      阅读:101      评论:0      收藏:0      [点我收藏+]

报错

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 2,272 milliseconds ago.  The last packet sent successfully to the server was 2,258 milliseconds ago.
### The error may exist in pers/gs/dao/UserMapper.xml
### The error may involve pers.gs.dao.UserDao.getUserList
### The error occurred while executing a query
### Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

The last packet successfully received from the server was 2,272 milliseconds ago.  The last packet sent successfully to the server was 2,258 milliseconds ago.

原因

在网上查询许多,没有解决问题,最后考虑到我的数据库连接字符串

jdbc:mysql://localhost:3306/mybatis?useSSL=true&userUnicode=true&characterEncoding=UTF-8

解决方法

useSSL=true改为useSSL=false

The last packet successfully received from the server was 2,272 milliseconds ago. The last packet sent successfully to the server was 2,258 milliseconds ago.

原文:https://www.cnblogs.com/fengxiaoqi/p/12932764.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!