From da4d67065df83f78a6a93b170da9a178e0286d27 Mon Sep 17 00:00:00 2001 From: midoks Date: Wed, 3 Feb 2021 00:37:16 +0800 Subject: [PATCH] Update index.py --- plugins/mysql/index.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/mysql/index.py b/plugins/mysql/index.py index cd56244e6..0f265106a 100755 --- a/plugins/mysql/index.py +++ b/plugins/mysql/index.py @@ -580,6 +580,10 @@ def mapToList(map_obj): def __createUser(dbname, username, password, address): pdb = pMysqlDb() + + if username == 'root': + dbname = '*' + pdb.execute( "CREATE USER `%s`@`localhost` IDENTIFIED BY '%s'" % (username, password)) pdb.execute(