Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MySQL Server has Gone Away in Drupal 7

Tags:

mysql

drupal

In my form field type, i edit the file menu these error will appear,

Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 2006 MySQL server has gone away' in D:\wamp\www\cms_development\includes\database\database.inc on line 2168 ( ! ) PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away in D:\wamp\www\cms_development\includes\database\database.inc on line 2168

Anybody Know how to rectify this error...

like image 529
user2801936 Avatar asked Sep 24 '13 12:09

user2801936


People also ask

Does Drupal use MySQL?

Note: Drupal itself will generally operate with a default MariaDB/MySQL configuration.


1 Answers

This may be because of max_allowed_packet

Change in the my.ini/my.cnf file. Include the single line under [mysqld] in your file

max_allowed_packet=500M

now restart the MySQL service once you are done. You can see it's curent value in mysql like this:

SHOW VARIABLES LIKE 'max_allowed_packet'

You can read about it here http://dev.mysql.com/doc/refman/5.1/en/packet-too-large.html

like image 145
Sathish D Avatar answered Oct 03 '22 13:10

Sathish D