From 4e90620132ae6732e6ba4ebabeedf4c6b079900c Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 23 Jun 2022 21:25:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9mysql=E5=AF=BC=E5=87=BAtmp?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/mysql/conf/my.cnf | 2 +- plugins/mysql/conf/my5.7.cnf | 2 +- plugins/mysql/conf/my8.0.cnf | 2 +- plugins/mysql/index.py | 4 ++++ 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/plugins/mysql/conf/my.cnf b/plugins/mysql/conf/my.cnf index 26cf2e994..c51593d2f 100644 --- a/plugins/mysql/conf/my.cnf +++ b/plugins/mysql/conf/my.cnf @@ -80,7 +80,7 @@ innodb_write_io_threads = 1 innodb_file_per_table=1 -secure-file-priv=/tmp +secure-file-priv={$SERVER_APP_PATH}/tmp [mysqldump] quick diff --git a/plugins/mysql/conf/my5.7.cnf b/plugins/mysql/conf/my5.7.cnf index b1ceb4ecb..02d4b649d 100644 --- a/plugins/mysql/conf/my5.7.cnf +++ b/plugins/mysql/conf/my5.7.cnf @@ -76,7 +76,7 @@ innodb_read_io_threads = 1 innodb_write_io_threads = 1 innodb_file_per_table=1 -secure-file-priv=/tmp +secure-file-priv={$SERVER_APP_PATH}/tmp [mysqldump] quick diff --git a/plugins/mysql/conf/my8.0.cnf b/plugins/mysql/conf/my8.0.cnf index 453ee1173..e4acaf3db 100644 --- a/plugins/mysql/conf/my8.0.cnf +++ b/plugins/mysql/conf/my8.0.cnf @@ -77,7 +77,7 @@ innodb_write_io_threads = 1 innodb_file_per_table=1 binlog_expire_logs_seconds=2592000 -secure-file-priv=/tmp +secure-file-priv={$SERVER_APP_PATH}/tmp [mysqldump] quick diff --git a/plugins/mysql/index.py b/plugins/mysql/index.py index 1d624817c..557616a5b 100755 --- a/plugins/mysql/index.py +++ b/plugins/mysql/index.py @@ -161,6 +161,10 @@ def initDreplace(version=''): if not os.path.exists(mysql_conf_dir): os.mkdir(mysql_conf_dir) + mysql_tmp = getServerDir() + '/tmp' + if not os.path.exists(mysql_tmp): + os.mkdir(mysql_tmp) + mysql_conf = mysql_conf_dir + '/my.cnf' if not os.path.exists(mysql_conf): mysql_conf_tpl = getPluginDir() + '/conf/my' + version + '.cnf'