mysql5.6 配置 文件
程序员文章站
2022-06-17 20:50:59
mysql 3306 主库配置文件 [client] port = 3306 default-character-set=utf8mb4 socket = /ssd/mysql/3306/tmp/mysql.sock # Here follows entries for some specific ... ......
mysql 3306 主库配置文件
[client]
port = 3306
default-character-set=utf8mb4
socket = /ssd/mysql/3306/tmp/mysql.sock
# here follows entries for some specific programs
# the mysql server
[mysqld]
secure_file_priv="/"
#!include /ssd/mysql/3306/etc/mysqld.cnf
skip-slave-start
character-set-server=utf8mb4
slave-skip-errors = 1062
log-slave-updates
server-id=146
performance_schema = on
port = 3306
basedir = /usr/local/mysql
socket = /ssd/mysql/3306/tmp/mysql.sock
pid-file = /ssd/mysql/3306/data/mysql.pid
datadir = /ssd/mysql/3306/data
tmpdir = /ssd/mysql/3306/tmp
slave-load-tmpdir = /ssd/mysql/3306/tmp
skip-external-locking
skip-name-resolve
max_connections = 4000
max_connect_errors = 4000
back_log=600
wait_timeout=150
interactive_timeout=150
default_storage_engine=innodb
character_set_server=utf8mb4
key_buffer_size = 128m
max_allowed_packet = 128m
table_open_cache = 2048
thread_cache_size = 1000
query_cache_size = 256m
thread_concurrency = 48
log-bin = mysql-bin
#log-bin = 0
relay-log = relay-log
relay_log_index = relay-log.index
log-warnings = 1
log-error = /ssd/mysql/3306/log/mysql.err
slow_query_log = 1
long-query-time = 2
slow_query_log_file = /ssd/mysql/3306/log/slow.log
#general_log = 1
#general_log_file = /ssd/mysql/3306/log/mysql.log
max_binlog_size = 1g
max_relay_log_size = 1g
expire_logs_days = 7
binlog_cache_size = 64m
replicate-wild-ignore-table = mysql.%
replicate-wild-ignore-table = test.%
relay-log-purge = 1
key_buffer_size = 64m
sort_buffer_size = 16m
read_buffer_size = 16m
join_buffer_size = 16m
read_rnd_buffer_size = 64m
bulk_insert_buffer_size = 64m
myisam_sort_buffer_size = 64m
myisam_max_sort_file_size = 256m
myisam_repair_threads = 1
myisam_recover_options
group_concat_max_len = 64k
transaction_isolation = repeatable-read
innodb_file_per_table
innodb_file_format = barracuda
innodb_additional_mem_pool_size = 100m
innodb_buffer_pool_size = 25g
innodb_data_home_dir = /ssd/mysql/3306/data
innodb_data_file_path = ibdata1:1g:autoextend
innodb_file_io_threads = 4
innodb_read_io_threads =48
innodb_write_io_threads =48
innodb_io_capacity =600
innodb_thread_concurrency = 16
innodb_flush_log_at_trx_commit = 2
tmp_table_size = 128m
innodb_log_buffer_size = 16m
innodb_log_file_size = 512m
innodb_log_files_in_group = 2
innodb_log_group_home_dir = /ssd/mysql/3306/data
innodb_max_dirty_pages_pct = 90
innodb_lock_wait_timeout = 120
log-bin=mysql-bin
binlog_format=mixed
innodb_flush_method=o_direct
[mysqldump]
quick
max_allowed_packet = 16m
[mysql]
no-auto-rehash
[myisamchk]
key_buffer_size = 64m
sort_buffer_size = 64m
read_buffer = 2m
write_buffer = 2m
[xtrabackup]
default-character-set = utf8
mysql 3336 从库配置文件
[client]
port = 3336
default-character-set=utf8mb4
socket = /ssd/mysql/3336/tmp/mysql.sock
# here follows entries for some specific programs
# the mysql server
[mysqld]
secure_file_priv="/"
#!include /ssd/mysql/3336/etc/mysqld.cnf
skip-slave-start
character-set-server=utf8mb4
slave-skip-errors = 1062
log-slave-updates
server-id=147
performance_schema = on
port = 3336
basedir = /usr/local/mysql
socket = /ssd/mysql/3336/tmp/mysql.sock
pid-file = /ssd/mysql/3336/data/mysql.pid
datadir = /ssd/mysql/3336/data
tmpdir = /ssd/mysql/3336/tmp
slave-load-tmpdir = /ssd/mysql/3336/tmp
skip-external-locking
skip-name-resolve
max_connections = 4000
max_connect_errors = 4000
back_log=600
wait_timeout=150
interactive_timeout=150
default_storage_engine=innodb
character_set_server=utf8mb4
key_buffer_size = 128m
max_allowed_packet = 128m
table_open_cache = 2048
thread_cache_size = 1000
query_cache_size = 256m
thread_concurrency = 48
log-bin = mysql-bin
#log-bin = 0
relay-log = relay-log
relay_log_index = relay-log.index
log-warnings = 1
log-error = /ssd/mysql/3336/log/mysql.err
slow_query_log = 1
long-query-time = 2
slow_query_log_file = /ssd/mysql/3336/log/slow.log
#general_log = 1
#general_log_file = /ssd/mysql/3336/log/mysql.log
max_binlog_size = 1g
max_relay_log_size = 1g
expire_logs_days = 7
binlog_cache_size = 64m
replicate-wild-ignore-table = mysql.%
replicate-wild-ignore-table = test.%
relay-log-purge = 1
key_buffer_size = 64m
sort_buffer_size = 16m
read_buffer_size = 16m
join_buffer_size = 16m
read_rnd_buffer_size = 64m
bulk_insert_buffer_size = 64m
myisam_sort_buffer_size = 64m
myisam_max_sort_file_size = 256m
myisam_repair_threads = 1
myisam_recover_options
group_concat_max_len = 64k
transaction_isolation = repeatable-read
innodb_file_per_table
innodb_file_format = barracuda
innodb_additional_mem_pool_size = 100m
innodb_buffer_pool_size = 25g
innodb_data_home_dir = /ssd/mysql/3336/data
innodb_data_file_path = ibdata1:1g:autoextend
innodb_file_io_threads = 4
innodb_read_io_threads =48
innodb_write_io_threads =48
innodb_io_capacity =600
innodb_thread_concurrency = 16
innodb_flush_log_at_trx_commit = 2
tmp_table_size = 128m
innodb_log_buffer_size = 16m
innodb_log_file_size = 512m
innodb_log_files_in_group = 2
innodb_log_group_home_dir = /ssd/mysql/3336/data
innodb_max_dirty_pages_pct = 90
innodb_lock_wait_timeout = 120
log-bin=mysql-bin
binlog_format=mixed
innodb_flush_method=o_direct
[mysqldump]
quick
max_allowed_packet = 16m
[mysql]
no-auto-rehash
[myisamchk]
key_buffer_size = 64m
sort_buffer_size = 64m
read_buffer = 2m
write_buffer = 2m
[xtrabackup]
default-character-set = utf8