Jump to content

[MySQL] How can I change "max_allowed_packet"?


THOR

Recommended Posts

Error Code: 2006 - MySQL server has gone away

  • Start MySQL 5.5 Command Line Client
  • At the command prompt, execute the foll. command

    mysql> show variables like 'max_allowed_packet';

___________________________

| Variable_name | Value |

___________________________

| max_allowed_packet | 1048576 |

___________________________

1 row in set (0.00 sec)

  • At the command prompt, execute the foll. command

    mysql> set global max_allowed_packet = 130 * 1024 * 1024;

  • Exit
  • Start MySQL 5.5 Command Line Client
  • At the command prompt, execute the foll. command

    mysql> show variables like 'max_allowed_packet';

_____________________________

| Variable_name | Value |

_____________________________

| max_allowed_packet | 136314880 |

_____________________________

1 row in set (0.00 sec)

This will set the global max packet size to 130 MB. All subsequent MySQL client connections will get this value as their session value for max packet

Now:

Source Database : information_schema

`GLOBAL_VARIABLES` VALUES ('MAX_ALLOWED_PACKET', '136314880');
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.