Mysqldump refusing to finish

Hi.

I have a cron job that does a database backup for RT.
That backup is currently failing with the following error:

mysqldump: Error 2020: Got packet bigger than ‘max_allowed_packet’ bytes when dumping table Attachments at row: 1784599

My mysqldump command looks like this:

/usr/local/mysql/bin/mysqldump --opt --skip-extended-insert
–skip-lock-tables --single-transaction --complete-insert
–max_allowed_packet=32M rt3 | bzip2 -9 > rt3.out-date +\%Y\%m\%d-\%H.bz2

I could increase the ‘max_allowed_packet’ setting.
I could add ‘–default-character-set=binary’.

Would these help?
Does anyone have any other suggestions?

Kind regards.

Luke Vanderfluit.
Analyst/Programmer.
Internode Systems Pty. Ltd.

Hi.

I have a cron job that does a database backup for RT.
That backup is currently failing with the following error:

mysqldump: Error 2020: Got packet bigger than ‘max_allowed_packet’ bytes when dumping table Attachments at row: 1784599

My mysqldump command looks like this:

/usr/local/mysql/bin/mysqldump --opt --skip-extended-insert
–skip-lock-tables --single-transaction --complete-insert
–max_allowed_packet=32M rt3 | bzip2 -9 > rt3.out-date +\%Y\%m\%d-\%H.bz2

recent mysqldump versions do some funky things with combining insert
statements. Your “–max_allowed_packet=32M” should match what you have
defined for that variable in /etc/my.cnf, and to be on the safe side I’d
check that your running mysql instance is using the value you think it
is:

mysql rt3 -e ‘show variables;’ | grep max_allowed_packet

…and I’d also add the following to your mysqldump command:

-O net_buffer_length=32M

(presuming that your max_allowed_packet size is actually 32M. I thought

the ceiling was 16M, but I’m no mysql DBA.)

/Ole Craig
Security Engineer

303-381-3802 (main support hotline)
303-381-3824 (my direct line)
303-381-3801 (fax)

www.stillsecure.com
. . .

try “mysqldump -q”

ruzaOn 07/06/06 01:07, Luke Vanderfluit wrote:

Hi.

I have a cron job that does a database backup for RT.
That backup is currently failing with the following error:

mysqldump: Error 2020: Got packet bigger than ‘max_allowed_packet’ bytes
when dumping table Attachments at row: 1784599

My mysqldump command looks like this:

/usr/local/mysql/bin/mysqldump --opt --skip-extended-insert
–skip-lock-tables --single-transaction --complete-insert
–max_allowed_packet=32M rt3 | bzip2 -9 > rt3.out-date +\%Y\%m\%d-\%H.bz2

I could increase the ‘max_allowed_packet’ setting.
I could add ‘–default-character-set=binary’.

Would these help?
Does anyone have any other suggestions?

Kind regards.

Pavel Ruzicka, ICZ

*** ICZ a.s. ******************************
Hvezdova 1689/2a, 140 00 Prague 4, CZ
tel: +420 24 41 00 111 _
Fax: +420 24 41 00 222 @_}-,^–`–
GSM: +420 724 429 641
mailto:pavel.ruzicka@i.cz http://www.i.cz

Hi.

Thanks for your help.
The problem has been solved by adding the default character set directive.

Kind regards.
Luke.

Luke Vanderfluit wrote:

Hi.

I have a cron job that does a database backup for RT.
That backup is currently failing with the following error:

mysqldump: Error 2020: Got packet bigger than ‘max_allowed_packet’
bytes when dumping table Attachments at row: 1784599

My mysqldump command looks like this:

/usr/local/mysql/bin/mysqldump --opt --skip-extended-insert
–skip-lock-tables --single-transaction --complete-insert
–max_allowed_packet=32M rt3 | bzip2 -9 > rt3.out-date +\%Y\%m\%d-\%H.bz2

I could increase the ‘max_allowed_packet’ setting.
I could add ‘–default-character-set=binary’.

Would these help?
Does anyone have any other suggestions?

Kind regards.

Luke Vanderfluit.
Analyst/Programmer.
Internode Systems Pty. Ltd.