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

StackOverflow https://stackoverflow.com/questions/22989129

  •  01-07-2023
  •  | 
  •  

Question

I have installed mysql server 5.1. I am having a problem with BLOB fields in my MySQL database when i try to insert a huge file. Does anybody have any suggestion?

Thanks a lot in advance

Was it helpful?

Solution

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.

OTHER TIPS

  • Turn on Mysql Workbench and copy this line: “SET GLOBAL max_allowed_packet=16777216;” and Query the command.
  • Turn off Mysql Workbench and restart.

  • You can change your packet size to 32M by change the value of max_allowed_packet.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top