SET GLOBAL max_allowed_packet doesn't work

前端 未结 5 1402
忘掉有多难
忘掉有多难 2020-12-24 06:51

I found out how to change the default value of max_allowed_packet in MySQL using SET GLOBAL. However, each time I used this command, the default va

5条回答
  •  时光说笑
    2020-12-24 07:34

    After running

    set global max_allowed_packet=1000000000;
    

    you have to restart mysql before

    SHOW VARIABLES LIKE 'max_allowed_packet'
    

    will show the new value.

    I have this issue when restarting mysql through the MAC OSX system preferences and the value hadn't changed. So by logging into mysql via console

    mysql -u root -p
    

    changing it and then restarting mySql seemed to work. Might have been a OS X quirk though.

提交回复
热议问题