Page 1 of 1

How make to work mysqldump variable.

Posted: Thu Mar 29, 2018 6:14 pm
by Kurogane
I want to know how i can use [mysqldump].

The problem i have is i'm getting "mysqldump: Error 2020: Got packet bigger than 'max_allowed_packet'"

I'm trying to put in my.cnf but not work

Code: Select all

[mysqldump]
max_allowed_packet=64M
When i try to run cli mysqldump always give me same error.

Code: Select all

mysqldump --defaults-file=/usr/local/vesta/conf/.mysql.localhost --single-transaction USER_db1 > db.sql
mysqldump: Error 2020: Got packet bigger than 'max_allowed_packet' bytes when dumping table `wp_postmeta` at row: 870
But when i try to run works

Code: Select all

mysqldump --defaults-file=/usr/local/vesta/conf/.mysql.localhost --max_allowed_packet=64M --single-transaction USER_db1 > db.sql
Any ideas what is going on?

Re: How make to work mysqldump variable.

Posted: Thu Apr 19, 2018 5:04 am
by romani
Add to comand --max_allowed_packet=512M or needle size.
Example

Code: Select all

mysqldump --defaults-file=$mycnf --max_allowed_packet=512M --single-transaction -r $1 $2 2> $err