- Status changed to Fixed
11 months ago 9:12pm 1 February 2024 - 🇬🇧United Kingdom steven jones
Looks like this got committed to 7.x-3.x already.
Automatically closed - issue fixed for 2 weeks with no activity.
When verifying a (remote) server running MySQL 8.0 (default on Ubuntu 20.04), we get:
Unable to grant privileges to database users.
This appears to be due to no longer being able to implicitly create a user using GRANT
. The supported syntax now requires two statements:
CREATE USER 'username' IDENTIFIED BY 'password';
GRANT alter,create,delete,[...] ON database.* TO 'username';
This is handled in Provision_Service_db_mysql::grant()
, where we call:
$this->query("GRANT ALL PRIVILEGES ON `%s`.* TO `%s`@`%s` IDENTIFIED BY '%s'", $name, $username, $host, $password)
The 2-statement syntax (CREATE USER
,then GRANT
) appears to be backwards compatible to MySQL 5, so we could:
grant()
;create_user()
method (called from grant()
?);
Provision_Service_db_mysql
and override grant()
with the new syntax.Fixed
3.0
DB Service
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Looks like this got committed to 7.x-3.x already.
Automatically closed - issue fixed for 2 weeks with no activity.