Error 2020: Got packet bigger than 'max_allowed_packet' bytes when dumping table
Solution 1:
This a reply from expert exchange:
You will have to increase the max_allowed_packet under the mysqldump section in the my.cnf, the default is 25M
[mysqldump] max_allowed_packet = 1G
Alternatively, you can invoke mysqldump with the desired max_allowed_packet value.
mysqldump --max_allowed_packet=1G
Solution 2:
That's not 'alternatively'. mysqldump is notorious for ignoring this value in my.cnf, but setting it as the command line parameter always works.
Solution 3:
Please use the below command to fix your issue.
# mysqldump --max_allowed_packet=1024M -u root -p database > dumpfile.sql
This will solve your issue
Note: You can set a maximum value as you want. Here we have used 1024M as an example.