欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

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

程序员文章站 2022-04-04 20:56:27
...

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

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

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
相关标签: mybatis