From ab72fe93751332c9acfdf8432f8396fb42a6a688 Mon Sep 17 00:00:00 2001 From: wayn <1669738430@qq.com> Date: Wed, 1 Nov 2023 00:19:26 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E5=95=86=E5=9F=8E):=20=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E9=83=A8=E7=BD=B2=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker-compose-es7-rabbitmq-redis-mysql.yml | 3 +- mysql/conf/my.cnf | 37 --------------- .../src/main/resources/logback-spring.xml | 45 +++++++++++++++++++ 3 files changed, 47 insertions(+), 38 deletions(-) create mode 100644 waynboot-message-consumer/src/main/resources/logback-spring.xml diff --git a/docker-compose-es7-rabbitmq-redis-mysql.yml b/docker-compose-es7-rabbitmq-redis-mysql.yml index f99a3ae..8051bd0 100644 --- a/docker-compose-es7-rabbitmq-redis-mysql.yml +++ b/docker-compose-es7-rabbitmq-redis-mysql.yml @@ -57,5 +57,6 @@ services: volumes: - ./mysql/data:/var/lib/mysql - ./db-init:/docker-entrypoint-initdb.d - command: mysqld --lower_case_table_names=1 --default-authentication-plugin=mysql_native_password + # - ./mysql/conf.d:/etc/mysql/conf.d + command: mysqld --lower_case_table_names=1 --slow_query_log=1 --max_connections=1000 --default-authentication-plugin=mysql_native_password network_mode: "host" diff --git a/mysql/conf/my.cnf b/mysql/conf/my.cnf index e74a844..434b9ba 100644 --- a/mysql/conf/my.cnf +++ b/mysql/conf/my.cnf @@ -1,38 +1,10 @@ [mysqld] -user=mysql -basedir=/app/database/mysql -datadir=/data/3306 -server_id=6 -socket=/tmp/mysql.sock -bind-address = 0.0.0.0 -# connect max_connections = 1000 max_connect_errors = 200 -# charset character_set_server = utf8mb4 -# InnoDB Settings -innodb_buffer_pool_size = 2G -innodb_read_io_threads = 15 -innodb_write_io_threads = 15 -# innodb_flush_log_at_trx_commit = 0 -innodb_buffer_pool_instances = 8 -innodb_log_file_size = 1G -innodb_log_buffer_size = 64M -# innodb_flush_method = O_DIRECT -innodb_page_cleaners = 16 - -# session memory settings -read_buffer_size = 32M -read_rnd_buffer_size = 32M -sort_buffer_size = 64M -tmp_table_size = 64M -join_buffer_size = 128M -thread_cache_size = 64 - -# slow log slow_query_log = 1 slow_query_log_file = slow.log long_query_time = 10 @@ -40,12 +12,3 @@ min_examined_row_limit = 100 log-queries-not-using-indexes log_throttle_queries_not_using_indexes = 10 log_timestamps = system - -# log settings -log_error = error.log - -# client settings -[mysql] -prompt = (\\u@\\h) [\\d]>\\_ -socket=/tmp/mysql.sock -no-auto-rehash diff --git a/waynboot-message-consumer/src/main/resources/logback-spring.xml b/waynboot-message-consumer/src/main/resources/logback-spring.xml new file mode 100644 index 0000000..7a96065 --- /dev/null +++ b/waynboot-message-consumer/src/main/resources/logback-spring.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + ${pattern} + + + + + ${logPath}/info.log + + ${pattern} + + + ${logPath}/run.%d{yyyy-MM-dd}.log + + + + + + + + + + + + + + +