correct syntax for CREATE USER when using mysql8

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2018-12-04 15:42:05 +01:00
parent 5dd915736b
commit 034d1b1c8e

View File

@@ -70,7 +70,7 @@ class DbManagerMySQL {
if (Database::getAttribute(PDO::ATTR_SERVER_VERSION) >= '8.0.0') {
// create user
$stmt = Database::prepare("
CREATE USER `" . $username . "`.`" . $access_host . "` IDENTIFIED BY 'password'
CREATE USER '" . $username . "'.'" . $access_host . "' IDENTIFIED BY 'password'
");
Database::pexecute($stmt);
// grant privileges