From 92d83bb82da37a1d99333751848c4885cabf6ecc Mon Sep 17 00:00:00 2001 From: midoks Date: Sat, 1 Oct 2022 20:09:32 +0800 Subject: [PATCH] Update index.py --- plugins/mariadb/index.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/mariadb/index.py b/plugins/mariadb/index.py index 62112a5d7..937a89ed1 100755 --- a/plugins/mariadb/index.py +++ b/plugins/mariadb/index.py @@ -365,7 +365,7 @@ def initMariaDbPwd(): mw.execShell(drop_test_db) # 删除冗余账户 - hostname = mw.execShell('hostname')[0] + hostname = mw.execShell('hostname')[0].strip() drop_hostname = serverdir + '/bin/mysql --defaults-file=' + \ myconf + ' -uroot -p' + pwd + ' -e "drop user \'\'@\'' + hostname + '\'";' mw.execShell(drop_hostname)