Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

mysqldump: Error 2020: Got packet bigger than 'max_allowed_packet' bytes when dumping table

mysqldump: Error 2020: Got packet bigger than 'max_allowed_packet' bytes when dumping table

happens, when I do a

mysqldump -u root -p database >dumpfile.sql

I increased max_allowed_packet to the max value already (1073741824) to no avail.

How come that one cannot dump a database with mysqls on board means? Cause may be a longblob in a data row/column which may be maximum size of 4 GB (4294967295 bytes).

Could it be the network transport being used? Would there be another transport?

like image 551
Krischu Avatar asked Mar 10 '16 17:03

Krischu


1 Answers

Use below command mysqldump --max_allowed_packet=512M -u root -p database > dumpfile.sql

This will solve your issue

like image 101
upinder kumar Avatar answered Oct 22 '22 02:10

upinder kumar