遇到的问题:The driver has not received any packets from the server
今天新拉了一个项目,点击是碰到数据库的错误,Communications link failureThe driver has not received any packets from the server.花了我接近一天的时间,特写一篇博客纪念一下,防止下次再犯这种弱智错误最先开始是觉得代码有问题连续检查了好几遍都没有发现什么错到网上查很多人都说修改MySQL的参数,wait_timeout最
·
今天新拉了一个项目,点击是碰到数据库的错误,
Communications link failure
The driver has not received any packets from the server.
花了我接近一天的时间,特写一篇博客纪念一下,防止下次再犯这种弱智错误
最先开始是觉得代码有问题
连续检查了好几遍都没有发现什么错
到网上查
很多人都说
修改MySQL的参数,wait_timeout最大为31536000即1年,在my.cnf中加入:
[mysqld]
wait_timeout=31536000
interactive_timeout=31536000
但是我的数据库明显不是这个错误,一查,果然有两个模块,我只改了一个模块的数据库地址,完事我把两个地址一改,您猜怎么着,通了。
更多推荐
已为社区贡献1条内容
所有评论(0)