How do I increase the `max_allowed_packet` size in MySQL to prevent shutdown errors?

Responsive Ad Header

Question

Grade: Education Subject: Support
How do I increase the `max_allowed_packet` size in MySQL to prevent shutdown errors?
Asked by:
84 Viewed 84 Answers
Responsive Ad After Question

Answer (84)

Best Answer
(327)
A common cause is a small `max_allowed_packet` size. You can increase this value by editing the `my.ini` file. Locate the `[mysqld]` section and add or modify the line `max_allowed_packet=64M` (or a larger value, depending on your needs). Restarting the Apache and MySQL services after making changes to `my.ini` is essential.