Update index.py

pull/144/head
midoks 3 years ago
parent 7c147fed69
commit f2d0de91f8
  1. 11
      plugins/mysql/index.py

@ -371,6 +371,12 @@ def initMysqlPwd():
pwd + "') WHERE user='root';"
cmd_pass = cmd_pass + "flush privileges;\""
data = mw.execShell(cmd_pass)
# 删除测试数据库
drop_test_db = serverdir + '/bin/mysql -uroot -p' + \
pwd + ' -e "drop database test";'
mw.execShell(drop_test_db)
# print(data)
pSqliteDb('config').where('id=?', (1,)).save('mysql_root', (pwd,))
return True
@ -405,6 +411,11 @@ def initMysql8Pwd():
# print(data)
os.remove(tmp_file)
# 删除测试数据库
drop_test_db = serverdir + '/bin/mysql -uroot -p' + \
pwd + ' -e "drop database test";'
mw.execShell(drop_test_db)
pSqliteDb('config').where('id=?', (1,)).save('mysql_root', (pwd,))
return True

Loading…
Cancel
Save