diff --git a/plugins/mysql/index.py b/plugins/mysql/index.py index 63c30a2ef..c6780a128 100755 --- a/plugins/mysql/index.py +++ b/plugins/mysql/index.py @@ -1241,7 +1241,7 @@ def setDbAccess(): __createUser(dbname, name, password, access) - psdb.where('username=?', (name,)).save('accept', (access,)) + psdb.where('username=?', (name,)).save('accept,rw', (access, 'rw',)) return mw.returnJson(True, '设置成功!') @@ -1283,7 +1283,7 @@ def setDbRw(version=''): pdb.execute("flush privileges") r = psdb.where("id=?", (uid,)).setField('rw', rw) # print(r) - return mw.returnJson(True, '设置成功!') + return mw.returnJson(True, '切换成功!') def getDbInfo(): diff --git a/plugins/mysql/js/mysql.js b/plugins/mysql/js/mysql.js index abff1a8f6..22a65f160 100755 --- a/plugins/mysql/js/mysql.js +++ b/plugins/mysql/js/mysql.js @@ -606,6 +606,7 @@ function setDbAccess(username){ var rdata = $.parseJSON(data.data); showMsg(rdata.msg,function(){ layer.close(index); + dbList(); },{icon: rdata.status ? 1 : 2}); }); }