Skip to main content
TOPICS

CATEGORY

PUBLISHED
26 April 2022

MODIFIED
28 September 2024

MySql Max Allowed Packet value

If you are using a MySql database and receiving an error message like “packets larger than max_allowed_packet” you need to increase the MySql variable max_allowed_packet value from 1MB, which is the default value, to something bigger like 5MB.

Some instructions on changing this value can be found on the MySQL website here:

https://dev.mysql.com/doc/refman/5.5/en/packet-too-large.html

There are also some discussions on the subject here:

http://stackoverflow.com/questions/8062496/how-to-change-max-allowed-packet-size

This error happens because some images such as photos can be bigger than 1MB and MySQL is defined to only accept 1MB BLOB values by default.