MySQL5.7 关键参数配置
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了MySQL5.7 关键参数配置相关的知识,希望对你有一定的参考价值。
# general
server_id=1
max_connections=1000
skip-name-resolve
open_files_limit=65535
# log
log_timestamps=system
binlog_format=row
log_bin=/var/lib/mysql/logs/mysql01-bin
slow_query_log=1
long_query_time=2
slow_query_log_file=/var/lib/mysql/logs/slow.log
relay-log=/var/lib/mysql/logs/relay-bin
expire-logs-days=7
# innodb
innodb_buffer_pool_size=512M
innodb_log_file_size=128M
innodb_buffer_pool_instances=4
innodb_read_io_threads=8
innodb_write_io_threads=8
sort_buffer_size=2M
read_rnd_buffer_size=2M
# master slave
gtid_mode=on
enforce_gtid_consistency=on
log_slave_updates=1
slave_parallel_type=logical_clock
slave_parallel_workers=8
以上是关于MySQL5.7 关键参数配置的主要内容,如果未能解决你的问题,请参考以下文章