Skip to content

Commit 2eb24fc

Browse files
authored
Merge pull request #18009 from nextcloud/bugfix/noid/install-with-mysql-8.0.4+
Fix installing with MySQL 8.0.4+
2 parents e358d79 + 77d814d commit 2eb24fc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/private/Setup/MySQL.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,9 @@ private function createDBUser($connection) {
100100
$password = $this->dbPassword;
101101
// we need to create 2 accounts, one for global use and one for local user. if we don't specify the local one,
102102
// the anonymous user would take precedence when there is one.
103-
$query = "CREATE USER '$name'@'localhost' IDENTIFIED BY '$password'";
103+
$query = "CREATE USER '$name'@'localhost' IDENTIFIED WITH mysql_native_password BY '$password'";
104104
$connection->executeUpdate($query);
105-
$query = "CREATE USER '$name'@'%' IDENTIFIED BY '$password'";
105+
$query = "CREATE USER '$name'@'%' IDENTIFIED WITH mysql_native_password BY '$password'";
106106
$connection->executeUpdate($query);
107107
}
108108
catch (\Exception $ex){

0 commit comments

Comments
 (0)