MySQL: max_allowed_packet

Some times, when you backup or restore your database table with huge binary data, you will get max_allowed_packet error.

By default MySQL set the max_allowed_packet to 10M.
[email protected] [~]# mysqladmin variable | grep max_allowed_packet
| max_allowed_packet                      | 10485760

To fix it, change your MySQL global variable as step below.
1. Open /etc/my.cnf file.
[email protected] [~]# vi /etc/my.cnf

2. Insert the value as below.
max_allowed_packet = 64M

3. Save it and restart the MySQL services.

Published by

Mick Genie

Mick Genie is the founder of and working at ExaBytes Network Sdn Bhd and WPWebHost web host company. He is expertise in Windows and Linux environment especially web hosting related information, tips and trick as well as the IT Information.