Friday 22 April 2011

Set max blob size in MySQL


Edit /etc/mysql/my.cnf (Linux) or my.ini (Windows) to prevent exceptions "BatchUpdateException: Packet for query is too large (####### > 1048576)".
Default blob size is 1MB.

eg for uploading max 32MB

[mysqld]
max_allowed_packet=32M

[mysqldump]
max_allowed_packet=32M


No comments:

Post a Comment