idea中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 634 milliseconds ago. The last packet sent successfully to the server was 620 milliseconds ago.
### The error may exist in UserMapper.xml
### The error may involve UserMapper.GetUser
### 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 634 milliseconds ago. The last packet sent successf

 

 

解决方法: 将url中的UseSSL中的true改为false

posted @ 2020-09-09 16:46  F_sinclair  阅读(660)  评论(0编辑  收藏  举报