Mani's Blog

June 9, 2015

mysqldump: Error 2020: Got packet bigger than ‘max_allowed_packet’ bytes when dumping table `content_versions` at row: 0

Filed under: Uncategorized — mani @ 5:11 pm

issue:  While I running mysqldump, I ran into this issue.  I know this DB need bigger ‘max_allowed_packet’ value.  I have bumped the values, no luck.

mysql> show variables like ‘max_allowed_packet’;
+——————–+———–+
| Variable_name | Value |
+——————–+———–+
| max_allowed_packet | 134217728 |
+——————–+———–+
1 row in set (0.00 sec)

mysql> set global max_allowed_packet=536870912;
Query OK, 0 rows affected (0.00 sec)

Soultion: I have to setup the value –max_allowed_packet=1073741824  as a command line parameter to solve this issue.

Following line solved my issue.

mysqldump –max_allowed_packet=1073741824 –all-databases | gzip -c > all-db.sql.gz

Create a free website or blog at WordPress.com.