mybatis使用idea连接数据库报错的奇葩问题

ERROR QUERYING DATABASE.  CAUSE: COM.MYSQL.JDBC.EXCEPTIONS.JDBC4.COMMUNICATIONSEXCEPTION: COMMUNICAT

标签: mybatis

 在第一个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

  1. org.apache.ibatis.exceptions.PersistenceException: 
  2. ### Error querying database.  Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
  3.  
  4. 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.
  5. ### The error may exist in com/kuang/dao/UserMapper.xml
  6. ### The error may involve com.kuang.dao.UserDao.getUserList
  7. ### The error occurred while executing a query
  8. ### Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

解决:

将URL中的:useSSL=true

改为:useSSL=false
posted @   李白白白白白  阅读(1095)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 【杭电多校比赛记录】2025“钉耙编程”中国大学生算法设计春季联赛(1)
点击右上角即可分享
微信分享提示