今天新拉了一个项目,点击是碰到数据库的错误,
Communications link failure
The driver has not received any packets from the server.
花了我接近一天的时间,特写一篇博客纪念一下,防止下次再犯这种弱智错误
最先开始是觉得代码有问题
连续检查了好几遍都没有发现什么错
到网上查
很多人都说
修改MySQL的参数,wait_timeout最大为31536000即1年,在f中加入:
[mysqld]
wait_timeout=31536000
interactive_timeout=31536000
但是我的数据库明显不是这个错误,一查,果然有两个模块,我只改了一个模块的数据库地址,完事我把两个地址一改,您猜怎么着,通了。
如果觉得《遇到的问题:The driver has not received any packets from the server》对你有帮助,请点赞、收藏,并留下你的观点哦!