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
相关文章
相关标签/搜索