lando / drupal

The Official Drupal Lando plugin
https://docs.lando.dev/drupal
GNU General Public License v3.0
16 stars 16 forks source link

Drupal 9 and 10 recipes fail to launch if database is set to MySQL 8.0 #40

Closed GoonerW closed 8 months ago

GoonerW commented 2 years ago

I recently tried switching one of my development sites using the Drupal 9 recipe from MySQL 5.7 (default) to MySQL 8.0 and the container failed to start. Looking at the logs the MySQL Service itself was erroring on the following configuration that Lando provides in its custom mysql.cnf file query_cache_limit = 1M query_cache_size = 64M Query Cache has been removed completely from MySQL 8 (and was disabled by default back in MySQL 5.6) See this MySQL blog post for details. Copying the template mysql.cnf file and loading it as a custom config file in Lando, commenting out the above two lines, allows the MySQL 8 container to then launch successfully.

Can we get an updated Drupal 9 and 10 recipe that removes those lines as they're no longer needed. Perhaps also suggest for the Drupal 10 recipe, that MySQL 8.0 be the default as MySQL 5.7 goes EoL in October 2023?

DuaelFr commented 8 months ago

It seems that this has been addressed in lando/lando#1462 by the commit b418dd525333299de1a1a233ab88994af377e45e

AaronFeledy commented 8 months ago

Thanks for pointing that out @DuaelFr

GoonerW commented 8 months ago

It still wasn't working for me, until I realised that I was using a slightly different configuration (that still appears to have the issue). I changed my .lando.yml to

config:
     database: mysql:8.0

and it now seems to work

Previously, I was using an explicit service for the database (I think to workaround this original issue)

database: 
    type: mysql:8.0

This still fails