The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.

The error may exist in com/itheima/mapper/UserMapper.java (best guess)

The error may involve com.itheima.mapper.UserMapper.login

The error occurred while executing a query

Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

这种请况:解决办法
1.断开数据库,重启linux系统,再重新连接数据库
2.代码数据库SQL语句、注解中的SQL 大小写没有与数据库的一致
3.有单词写错
4.有代码顺序写错

上一篇:java网络,UDP实现在线聊天


下一篇:我用一个例子疏通“路由器漏洞&复现”【建议收藏!!】