com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failureThe last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
遇到这个错误如果不是放在服务器上长时间链接数据库的话,就按我接下来的
方法去解决
到db.properties文件下吧url仔细检查下,我是url的IP没有修改导致的于是把url修改localhost就好了,贴下图
![此url IP有误](https://img-blog.csdn.net/20161104215307245)
![修改为localhost](https://img-blog.csdn.net/20161104220039122)