max_allowed_packet error in mysql



Caused by: java.sql.BatchUpdateException: Packet for query is too large (1434172 > 1048576). You can change this value on the server by setting the max_allowed_packet' variable.


The max_allowed_packet variable can be set globally by running a query.
However, if you do not change it in the my.ini file (as dragon112 suggested), the value will reset when the server restarts, even if you set it globally.

To change the setting for everyone until the server restarts:
SET GLOBAL max_allowed_packet=1073741824;

Comments

  1. I executed your suggestion (SET GLOBAL max_allowed_packet=8777000;) at MySQL Workbench, and it seemed to work. But now it hangs with no reason. Sigh.

    ReplyDelete

Post a Comment

Popular posts from this blog

Changing the Java VM Memory Limits in Pentaho BI

CAS with Pentaho Community Edition

utf8_general_ci VS utf8_unicode_ci what should we use?