Problem/Motivation

Drupal 7 needs a core patch to support MySQL 8. The patch is there, but not yet committed in core. Without this patch Aegir cannot be installed with MySQL 8, or on a default Ubuntu 20.04 setup.

Steps to reproduce

Install Aegir with MySQL 8 on Ubuntu 20.04. It will fail with:

PDOException: SQLSTATE[42000]: Syntax error or access violation: 1231 Variable 'sql_mode' can't be set to the value of 'NO_AUTO_CREATE_USER' in lock_may_be_available() (line 167 of /var/aegir/hostmaster-7.x-3.186/includes/lock.inc).

Proposed resolution

There is a patch for MySQL 8 support in Drupal 7, but not yet in core. Provison makefiles should pin Drupal core, download and deploy this core patch, as workaround.

See background here: https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-11.html#mysqld-...

Remaining tasks

Pin drupal core and deploy the core patch in aegir.make, aegir-latest.make and aegir-dev.make

Comments

doka created an issue. See original summary.

doka’s picture

Please find my patch, although not sure all makefile should be changed.

colan’s picture

Status: Active » Needs review
tr’s picture

Status: Needs review » Postponed (maintainer needs more info)

#2978575: Mysql 8 Support on Drupal 7 has been committed, which should solve this issue. Can someone try to reproduce this and see if it is still a problem in Drupal 7.76 or greater?

llamech’s picture

Status: Postponed (maintainer needs more info) » Closed (duplicate)
Related issues: +#3145881: User creation has changed in MySQL 8.0

Drupal has added support for MySQL 8 since the most recent update here.

This also looks like a duplicate of #3145881: User creation has changed in MySQL 8.0.

colan’s picture

Title: Workaround in Provision for MySQL8 support in Drupal7 » Include Drupal 7 core support for MySQL 8
Status: Closed (duplicate) » Needs work

Actually, it's not a duplicate as this one deals with changes necessary for getting the Drupal core support, while the other deals with Aegir's handling of MySQL 8 over and above what Drupal core supports. Both are necessary.

  1. Drupal core version needs to be >= 7.76 as per the change record MySQL 8 Support on Drupal 7. (We shouldn't need to hardcode this; creating a new release should do it as the latest stable gets pulled in when we're not pinning the version.)
  2. Once we do that, we no longer need the patch.
agaq’s picture

Should this be closed?

Hostmaster is currently using Drupal core 7.77 (when installed with Debian package aegir 3.192 - and I assume any other installation method?) .

Trying to install 3.192 on latest Ubuntu 20.04.3 LTS (with MySQL 8) only returns the user creation error dealt with in https://www.drupal.org/project/provision/issues/3145881:

Caught drush error, ending drush_provision_hostmaster_install [error]
Array [error]
(
[PROVISION_GRANT_DB_USER_FAILED] => Array
(
[0] => Unable to grant privileges to database users.
)

)

colan’s picture

Status: Needs work » Fixed

Yes, thanks.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.