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.
[mysqld]
max_allowed_packet = 64M
3. Save it and restart the MySQL services.