Problem/Motivation
Aegir3 should run on MySQL8, support for MySQL8 was added in Drupal 7.76 and 7.77 in early December 2020.
Steps to reproduce
Install of Aegir with MySQL 8, i.e. on Ubuntu 20.04, 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. Hostmaster make file should download and deploy this core patch, as workaround.
Remaining tasks
Upgrade aegir to release 7.77
User interface changes
-
API changes
-
Data model changes
-
Comments
Comment #2
doka commentedPlease find my patch on drupal-org-core.make
Comment #3
colanComment #4
tr commented#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?
Comment #5
agaq commentedI just tried installing Aegir 3.190 (Drupal 7.76) on a Ubuntu 20.04 machine (running Mysql 8.0.22).
Installation fails with:
and later:
Comment #6
agaq commentedI may have been a bit quick and careless in filing my error report above in this thread.
The error message I get is not the same as that initially reported by @doka.
The error "PROVISION_GRANT_DB_USER_FAILED / Unable to grant privileges to database users" I get is the same as reported in the past for earlier versions of mysql in https://www.drupal.org/project/hostmaster/issues/2942248
That error was caused by Mysql having the validate_password plugin active and password validation policy being set to anything higher than LOW.
In Mysql 8, the validate_password plugin has been replaced by the validate_password component (see https://dev.mysql.com/doc/refman/8.0/en/validate-password.html).
But I just checked and the validate_password component is not active by default in Ubuntu 20.04. It is not active on my machine which returns the "PROVISION_GRANT_DB_USER_FAILED / Unable to grant privileges to database users" error.
And without the component active, there does not seem to be any kind of enforcement on password, as I managed to change it to the 2-letter word 'hi':
So it looks like that error, and failure to install 3.190 on Ubuntu 20.04 with Mysql 8.0, is not caused by password policy.
Comment #7
tr commented@agaq: Your problem looks like a problem reported with the Provision module with MySQL 8 - see #3145881: User creation has changed in MySQL 8.0. If that's what you're seeing, please try the patch in that issue and comment both there and here!
Comment #8
agaq commentedThanks @TR. I will gather info on how to apply a patch and try that. But I see 4 patches in https://www.drupal.org/project/provision/issues/3145881 and it is not too clear to me which I should try.
Comment #9
joseph.olstadComment #10
tr commentedI don't know either - it seems that the participants in that issue haven't settled on a solution. But that's where the solution to that particular problem is being discussed, and when they do figure it out then perhaps we can close this current problem. So my suggestion is to contribute to that issue if this problem affects you!
Comment #11
colanFrom #4:
We've confirmed that it is not. We simply need to cut a new Aegir release to pull in the latest version of Drupal core as we're not pinning the Drupal core version (the patch is no longer required). See #3168480: Include Drupal 7 core support for MySQL 8 for details; that's the open issue for cutting a new release.
And yes, see #3145881: User creation has changed in MySQL 8.0 for the DB issue.