Tags/topics: 
1
Answers
Vote up!
0
Vote down!

Drupal 7. When editing the content type appears this error.

Additional uncaught exception thrown while handling exception.

Original

PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: SELECT s.lid, t.translation, s.version FROM {locales_source} s LEFT JOIN {locales_target} t ON s.lid = t.lid AND t.language = :language WHERE s.source = :source AND s.context = :context AND s.textgroup = 'default'; Array ( [:language] => ru [:source] => Configure how content input by users is filtered, including allowed HTML tags. Also allows enabling of module-provided filters. [:context] => ) in locale() (line 720 of S:\home\go\www\modules\locale\locale.module).

Additional

PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: SELECT s.lid, t.translation, s.version FROM {locales_source} s LEFT JOIN {locales_target} t ON s.lid = t.lid AND t.language = :language WHERE s.source = :source AND s.context = :context AND s.textgroup = 'default'; Array ( [:language] => ru [:source] => A field which is not visible to the user, but is recorded with the submission. [:context] => ) in locale() (line 720 of S:\home\go\www\modules\locale\locale.module).

Uncaught exception thrown in session handler.

PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away in _drupal_session_write() (line 209 of S:\home\go\www\includes\session.inc).

Asked by: Di
on November 14, 2013

Comments

I get this error for editing categories

Original

PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: SELECT * FROM {commerce_flat_rate_service}; Array ( ) in commerce_flat_rate_commerce_shipping_service_info() (line 120 of /Applications/MAMP/htdocs/kickstart2/profiles/commerce_kickstart/modules/contrib/commerce_flat_rate/commerce_flat_rate.module).

- Wil Buschagne on March 17, 2014

1 Answer

Vote up!
0
Vote down!

You have a problem with your local MySQL configuration.

To resolve that problem you need to increase max_allowed_packet variable in MySQL.

The MySQL server of MAMP (not PRO) will be started without any my.cnf file. But you can create your own my.cnf file.

Stop servers
Create a "my.cnf" file in "/Applications/MAMP/conf/".
Add your content in to "my.cnf"
Save "my.cnf"
Start servers

You do not have to put a complete configuration in the my.cnf file. You can just add parts of a configuration ... for example:

[mysqld]
max_allowed_packet = 100M

https://drupal.org/node/1787038

Answer by: Wil Buschagne
Posted: Mar 17, 2014