MySQL Server has gone away!

MySQL Server has gone away!

Submitted by Jitesh Doshi on Fri, 09/21/2012 - 13:45
MySQL logo

While using or coding Drupal, if you come across an error to the effect "mysql server has gone away", right in the middle of a request, you may need to do the following.

Find the my.ini file under MySQL server installation directory (mine is under "data" subdirectory), and in the "[mysqld]" section add the following line (or replace the value if it already exists):

max_allowed_packet=16M

Now restart MySQL server and try again. It should work. If it doesn't, try a value higher than 16M.

© 2026 SpinSpire All rights reserved.