MySQL max_allowed_pa​​cket 重置 [英] MySQL max_allowed_packet reset

查看:46
本文介绍了MySQL max_allowed_pa​​cket 重置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于一些我不知道的原因,我几乎每天都必须重置 max_allowed_pa​​cket,有时一天中要多次重置:

For some reasons beyond my knowledge, I have to reset max_allowed_packet almost daily and sometimes multiple times during the day:

SET GLOBAL max_allowed_pa​​cket=1073741824;

我已经在 MySql 错误中搜索了这些方面的报告,但一无所获.我找不到任何关于为什么它被重置为 1M 的解释.

I have searched MySql bugs for a report along these lines but found nothing. I can not find any explanation as for why it is being reset to 1M.

注意以下几点:

  1. 客户端大多通过 J/Connector 连接.
  2. 显示全球状态;

"Uptime"
"3028406" #this is almost 35 days

  • SELECT VERSION();

    "VERSION()"
    "5.6.22-log"
    

  • 操作系统:Windows(虽然我有一个 CentOS {mysql 5.6.30} 服务器有同样的问题但不太常见)

  • Operating System: Windows (Although I have a CentOS {mysql 5.6.30} server having the same issue but less often)

    推荐答案

    更改 my.ini~/.my.cnf 中的设置.这样,限制也将在服务器重启等情况下继续存在.

    Change the setting in your my.ini or ~/.my.cnf. This way the limit will also survive server restarts etc.

    max_allowed_packet=1G 
    

    您的服务器有 35 天的正常运行时间,但 mysql 服务器可能在这期间消失了.

    Your server has 35days uptime but maybe the mysql server has gone away in between.

    这篇关于MySQL max_allowed_pa​​cket 重置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

  • 查看全文
    相关文章
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆