Resolve error “SQLSTATE[HY000]: General error: 2006 MySQL server has gone away” in Drupal 8

It’s a sunny day when suddenly… Working with Drupal 8 on MAMP 3.5 you could get this error:

Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: CREATE TABLE {cache_config}

To solve it, create a file called my.cnf in /Applications/MAMP/conf and enter:

[mysqld]
max_allowed_packet=64M

64M solved for me but you could have to increase it.

Restart MAMP and let’s start to pray. The error is gone, the sun is back.

References

https://www.drupal.org/node/2682187
https://www.drupal.org/node/1059718#comment-5914678
https://www.drupal.org/node/984112#comment-4694182
http://stackoverflow.com/a/8062538/1252920

Categories

Category BootstrapCategory CoffeescriptCategory DrupalCategory GravCategory HTMLCategory JavascriptCategory JoomlaCategory jQueryCategory LaravelCategory MagentoCategory PHPCategory SharePointCategory SpringCategory ThymeleafCategory WordPressCategory Workflow

Comments

Developed and designed by Netgloo
© 2016 Netgloo