Categories
Last entries
Tags

Ordered by tags1153

MySql ERROR 1153

(Got a packet bigger than max_allowed_packet bytes)


After I got a "Got a packet bigger than max_allowed_packet bytes" I've tried to set the Max_allowed_packet global variable using Navicat on the table Global_variables from the Information_schema table with no success. After trying more approaches my solution was to edit the my.ini initialization file. 


In the [mysqld] section of your my.ini file insert the following line:


max_allowed_packet = 128M


I used 128M because I can't imagine a sql query bigger than that (but if yours is bigger than 128M you really should rethink and optimize your code).


This should also fix some of the "mysql has gone away" errors also.


Other solutions I found on the web:


1. On the mysql terminal run


set global max_allowed_packet=1000000000; 

set global net_buffer_length=1000000; 

 

then restart the server;


2. Optimize the insert instruction so that the whole line should not exceed your max_allow_packet size (maybe a COMMIT after every N inserts).

 


No comments yet. Be the first to leave a comment !



Name
Email
Your website
Leave a comment



Blogs I read
Favorite sites
Last comments