I've never really had this error before but I am doing a rather large insert. How do I increase this setting? Also, how do I tell how much I am over what's allowed? I tried looking up the error, but i'm not using Fogbugz. Any help would be awesome.
This is a windows installation of mysq开发者_C百科l.
To set the max to 16MB for example, without requiring a restart, run:
SET GLOBAL max_allowed_packet = 16777216
How to fix this problem : change the value of the max_allowed_packet
variable in the configuration of your MySQL server.
How to know how much over what's allowed you are : not sure, but I would say that checking the size (in bytes) or your insert
query should give you an idea.
For more informations, you should take a look at the following section of the MySQL manual : C.5.2.10. Packet too large.
I faced a similar issue while using XAMPP and what I did was to open the my.ini file via the Config button of MySQL on the XAMPP control and changing max_allowed_packet from 1M to 100M. It solved my problem.
精彩评论