mysql 优化

This commit is contained in:
midoks
2023-10-09 20:32:35 +08:00
parent 5532dcd968
commit 962b0fa9c5
4 changed files with 8 additions and 7 deletions
+2 -1
View File
@@ -405,6 +405,8 @@ def initMysql8Pwd():
pwd + ' -e "drop database test";'
mw.execShell(drop_test_db)
pSqliteDb('config').where('id=?', (1,)).save('mysql_root', (pwd,))
# 删除冗余账户
hostname = mw.execShell('hostname')[0].strip()
if hostname != 'localhost':
@@ -416,7 +418,6 @@ def initMysql8Pwd():
myconf + ' -uroot -p' + pwd + ' -e "drop user \'root\'@\'' + hostname + '\'";'
mw.execShell(drop_root_hostname)
pSqliteDb('config').where('id=?', (1,)).save('mysql_root', (pwd,))
return True