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:


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.



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


Developed and designed by Netgloo
© 2019 Netgloo