From a61d9e68d35e1378e3b2eae0bb4b616aaa12ce59 Mon Sep 17 00:00:00 2001 From: ycz008 Date: Tue, 23 Jul 2024 10:12:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20prod=20mysql=20cfg?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- prod-upgrade/mysql/mysql-0.yaml | 7 ++++++- prod-upgrade/mysql/mysql-2.yaml | 4 ++-- prod-upgrade/mysql/mysql-3.yaml | 4 ++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/prod-upgrade/mysql/mysql-0.yaml b/prod-upgrade/mysql/mysql-0.yaml index 0d644b3..f558dff 100644 --- a/prod-upgrade/mysql/mysql-0.yaml +++ b/prod-upgrade/mysql/mysql-0.yaml @@ -17,6 +17,11 @@ data: max_allowed_packet=16M character-set-server=utf8mb4 collation-server=utf8mb4_unicode_ci + + # slow_query_log + slow_query_log=ON + slow_query_log_file=/var/lib/mysql/data/slow-query.log + long_query_time=3 # Extended max_connections=5000 @@ -136,4 +141,4 @@ spec: targetPort: 3306 selector: app: mysql-0 - type: ClusterIP \ No newline at end of file + type: ClusterIP diff --git a/prod-upgrade/mysql/mysql-2.yaml b/prod-upgrade/mysql/mysql-2.yaml index 919372b..80a0648 100644 --- a/prod-upgrade/mysql/mysql-2.yaml +++ b/prod-upgrade/mysql/mysql-2.yaml @@ -21,7 +21,7 @@ data: # Extended max_connections=5000 binlog_format=row - binlog_expire_logs_seconds=2592000 + binlog_expire_logs_seconds=1209600 sql_mode=STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION innodb_buffer_pool_size=4G innodb_log_file_size=1G @@ -136,4 +136,4 @@ spec: targetPort: 3306 selector: app: mysql-2 - type: ClusterIP \ No newline at end of file + type: ClusterIP diff --git a/prod-upgrade/mysql/mysql-3.yaml b/prod-upgrade/mysql/mysql-3.yaml index 12d2e77..2b958b3 100644 --- a/prod-upgrade/mysql/mysql-3.yaml +++ b/prod-upgrade/mysql/mysql-3.yaml @@ -21,7 +21,7 @@ data: # Extended max_connections=5000 binlog_format=row - binlog_expire_logs_seconds=2592000 + binlog_expire_logs_seconds=1209600 sql_mode=STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION innodb_buffer_pool_size=4G innodb_log_file_size=1G @@ -136,4 +136,4 @@ spec: targetPort: 3306 selector: app: mysql-3 - type: ClusterIP \ No newline at end of file + type: ClusterIP