mysql提示Packet for query is too large (1142 > 1024)解决方案

注:最近mysql一直提示如下错误

 Packet for query is too large (1185 > 1024). You can change this value on the server by setting the max_allowed_packet' variable.
...

 

按网上要求,检查max_allowed_packet

show VARIABLES like '%max_allowed_packet%';

 

修改max_allowed_packet

set global max_allowed_packet = 2*1024*1024*10

 

或者修改配置文件my.ini(windows)/my.cnf(linux)

max_allowed_packet = 20M

 

重启

后临时解决问题,但过了与一会儿后问题有存在了。后在http://bbs.csdn.net/topics/390983183上面看到,找到了原因.,直接将博主发现的原因总结如下:

mysql提示Packet for query is too large (1142 > 1024)解决方案

还有人说是这个原因

mysql提示Packet for query is too large (1142 > 1024)解决方案

最后大家说是由于被******了:

mysql提示Packet for query is too large (1142 > 1024)解决方案

mysql提示Packet for query is too large (1142 > 1024)解决方案

mysql提示Packet for query is too large (1142 > 1024)解决方案

mysql提示Packet for query is too large (1142 > 1024)解决方案

mysql提示Packet for query is too large (1142 > 1024)解决方案

 

 解决方法:

1. 修改root密码

2. 限制ip访问

 

上一篇:MySQL导入导出非常慢解决办法


下一篇:关于推流实现的直播代码,php直播平台源码