The Coding Journal ツ
Home
Impressum
x3ro’s Toolkit
One of those very helpful error messages. I got this error when importing a large database, and it was caused by some insert statements exceeding the configured max_allowed_packet size ( manual ). According to this bug entry , the error message should actually say
but that doesn’t seem to fixed to this day. To fix the error, simply increase max_allowed_packet in your my.cnf file, under the [mysqld] section, e.g.
Apparently, in newer versions of MySQL, the error message looks like this:
One of those very helpful error messages. I got this error when importing a large database, and it was caused by some insert statements exceeding the configured max_allowed_packet size (manual)....
Hay on October 10, 2012 at 9:43 pm said: Thanks! That did the trick to do an import of a 5GB SQL file. Reply ↓ Stone on January 23, 2013 at 8:01 am said: Hi Hay, How many MB did you set to make it work with 5GB sql file? Reply ↓ Lucas Jenß on January 23, 2013 at 8:12 am said: As far as I know, you can’t judge the max_allowed_packet directly from the size of the SQL file, given that the largest query in that SQL file dictates the max_allowed_packet value. In other words, packet size of 1M might be enough for an SQL file of 10GB, if that file only contains small queries. You should simply try doubling the max_allowed_packet value if your MySQL server still “goes away”, and if it doesn’t work after 5 or so iterations (starting at 16M), the problem probably lies somewhere else. Reply ↓
Thanks! That did the trick to do an import of a 5GB SQL file.
Stone on January 23, 2013 at 8:01 am said: Hi Hay, How many MB did you set to make it work with 5GB sql file? Reply ↓ Lucas Jenß on January 23, 2013 at 8:12 am said: As far as I know, you can’t judge the max_allowed_packet directly from the size of the SQL file, given that the largest query in that SQL file dictates the max_allowed_packet value. In other words, packet size of 1M might be enough for an SQL file of 10GB, if that file only contains small queries. You should simply try doubling the max_allowed_packet value if your MySQL server still “goes away”, and if it doesn’t work after 5 or so iterations (starting at 16M), the problem probably lies somewhere else. Reply ↓
Hi Hay, How many MB did you set to make it work with 5GB sql file?
Lucas Jenß on January 23, 2013 at 8:12 am said: As far as I know, you can’t judge the max_allowed_packet directly from the size of the SQL file, given that the largest query in that SQL file dictates the max_allowed_packet value. In other words, packet size of 1M might be enough for an SQL file of 10GB, if that file only contains small queries. You should simply try doubling the max_allowed_packet value if your MySQL server still “goes away”, and if it doesn’t work after 5 or so iterations (starting at 16M), the problem probably lies somewhere else. Reply ↓
As far as I know, you can’t judge the max_allowed_packet directly from the size of the SQL file, given that the largest query in that SQL file dictates the max_allowed_packet value. In other words, packet size of 1M might be enough for an SQL file of 10GB, if that file only contains small queries. You should simply try doubling the max_allowed_packet value if your MySQL server still “goes away”, and if it doesn’t work after 5 or so iterations (starting at 16M), the problem probably lies somewhere else.
Your email address will not be published. Required fields are marked *
Name *
Email *
Website
Comment
You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>