correct syntax for CREATE USER when using mysql8
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -70,7 +70,7 @@ class DbManagerMySQL {
|
|||||||
if (Database::getAttribute(PDO::ATTR_SERVER_VERSION) >= '8.0.0') {
|
if (Database::getAttribute(PDO::ATTR_SERVER_VERSION) >= '8.0.0') {
|
||||||
// create user
|
// create user
|
||||||
$stmt = Database::prepare("
|
$stmt = Database::prepare("
|
||||||
CREATE USER `" . $username . "`.`" . $access_host . "` IDENTIFIED BY 'password'
|
CREATE USER '" . $username . "'.'" . $access_host . "' IDENTIFIED BY 'password'
|
||||||
");
|
");
|
||||||
Database::pexecute($stmt);
|
Database::pexecute($stmt);
|
||||||
// grant privileges
|
// grant privileges
|
||||||
|
|||||||
Reference in New Issue
Block a user