Fix installing with MySQL 8.0.4+

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2019-11-19 15:57:54 +01:00 committed by Roeland Jago Douma
parent 2b2626566c
commit 77d814d35f
No known key found for this signature in database
GPG Key ID: F941078878347C0C
1 changed files with 2 additions and 2 deletions

View File

@ -100,9 +100,9 @@ class MySQL extends AbstractDatabase {
$password = $this->dbPassword;
// we need to create 2 accounts, one for global use and one for local user. if we don't specify the local one,
// the anonymous user would take precedence when there is one.
$query = "CREATE USER '$name'@'localhost' IDENTIFIED BY '$password'";
$query = "CREATE USER '$name'@'localhost' IDENTIFIED WITH mysql_native_password BY '$password'";
$connection->executeUpdate($query);
$query = "CREATE USER '$name'@'%' IDENTIFIED BY '$password'";
$query = "CREATE USER '$name'@'%' IDENTIFIED WITH mysql_native_password BY '$password'";
$connection->executeUpdate($query);
}
catch (\Exception $ex){