remember that your MySQL "max_allowed_packet" configuration setting (default 1MB)
When trying to INSERT or UPDATE and trying to put a large amount of text or data (blob) into a mysql table you might run into problems.
In mysql.err you might see:
Packet too large (73904)
To fix you just have to start up mysql with the option -O max_allowed_packet=maxsize
You would just replace maxsize with the max size you want to insert, the default is 65536
Both the client and the server have their own
max_allowed_packet variable, so if you want to handle big packets, you must increase this variable both in the client and in the server.
If you are using the mysql client program, its default
max_allowed_packet variable is 16MB. To set a larger value, start mysql like this:
That sets the packet size to 32MB.
The server’s default
max_allowed_packet value is 1MB. You can increase this if the server needs to handle big queries (for example, if you are working with big
BLOB columns). For example, to set the variable to 16MB, start the server like this:
You can also use an option file to set
max_allowed_packet. For example, to set the size for the server to 16MB, add the following lines in an option file: