From a1cf9fc980eb5b3459600b3d79132d11544df3c2 Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 6 Jan 2019 16:04:06 +0800 Subject: [PATCH] up --- plugins/mysql/class/mysql.py | 3 +++ plugins/mysql/index.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/mysql/class/mysql.py b/plugins/mysql/class/mysql.py index 6862b2a4c..01191cc53 100755 --- a/plugins/mysql/class/mysql.py +++ b/plugins/mysql/class/mysql.py @@ -51,6 +51,9 @@ class mysql: def setPwd(self, pwd): self.__DB_PASS = pwd + def getPwd(self): + return self.__DB_PASS + def execute(self, sql): # 执行SQL语句返回受影响行 if not self.__Conn(): diff --git a/plugins/mysql/index.py b/plugins/mysql/index.py index abd42a74d..fa9f43ff5 100755 --- a/plugins/mysql/index.py +++ b/plugins/mysql/index.py @@ -272,7 +272,7 @@ def runInfo(): 'Created_tmp_disk_tables', 'Created_tmp_tables', 'Innodb_buffer_pool_pages_dirty', 'Opened_files', 'Open_tables', 'Opened_tables', 'Select_full_join', 'Select_range_check', 'Sort_merge_passes', 'Table_locks_waited', 'Threads_cached', 'Threads_connected', 'Threads_created', 'Threads_running', 'Connections', 'Uptime'] try: if data[0] == 1045: - return public.returnJson(False, 'MySQL密码错误!') + return public.returnJson(False, 'MySQL密码错误:' + db.getPwd() + '!') except: pass