# mysqldump: Got packet bigger than max_allowed_packet
This error is thrown when the maximum allowed packed size is exceeded. The value can be changed by specifing the flag --max-allowed-packet
when running mysqldump
.
# The default & maximum value of --max-allowed-packet
The default value of --max-allowed-packet
is 24MB. The maximum value is 2GB.
# Solution
In order to fix the error you have to include the --max-allowed-packet
flag when running mysqldump
. Example:
# Set the max-allowed-packet to 512MB
mysqldump my_app --max-allowed-packet=512MB > my_backup.sql
# Set the max-allowed-packet to 1GB
mysqldump my_app --max-allowed-packet=1GB > my_backup.sql