user222427
user222427

Reputation:

MySQL Database Error: Packets larger than max_allowed_packet are not allowed - during insert

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 mysql.

Upvotes: 9

Views: 44297

Answers (3)

Kobina Ebo Yankson
Kobina Ebo Yankson

Reputation: 31

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.

Upvotes: 2

RedScourge
RedScourge

Reputation: 1116

To set the max to 16MB for example, without requiring a restart, run:

SET GLOBAL max_allowed_packet = 16777216

Upvotes: 15

Pascal MARTIN
Pascal MARTIN

Reputation: 400932

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.

Upvotes: 13

Related Questions