您的位置:首页 > 数据库 > MySQL

MySQL 5.7.13 参数文件参考

2016-08-05 12:51 351 查看
[client]
port=3306
socket=/app/mysql/config/mysql.sock
default_character_set=utf8
host=127.0.0.1
user=system
password=xxxxx

[mysql]
prompt="\u@\h \R:\m:\s [\d]> "
default_character_set=utf8
no-auto-rehash

[mysqld]
##############MySQL Server Basic##############
user=mysql
port=3306
report-port=3306
socket=/app/mysql/config/mysql.sock
pid-file=/app/mysql/config/mysql.pid
sql_mode=ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
basedir=/app/mysql/product
datadir=/data/mysql3306/db_data
tmpdir=/data/mysql3306/tmp
secure-file-priv=null
lower_case_table_names=1
explicit_defaults_for_timestamp=1
back_log=4096
relay_log_recovery=1
log_output=FILE
skip-name-resolve
skip-external-locking
############## Character-set ##############
character_set_server=utf8
collation_server= utf8_general_ci
############## Global buffers ##############
wait_timeout=1800
interactive_timeout=1800
open_files_limit=65535
max_connections=4000
max_connect_errors=1000000
query_cache_type=0
query_cache_size=0
table_open_cache=4096
table_definition_cache=1024
thread_cache_size=128
############## Thread buffers ##############
max_user_connections=2000
read_buffer_size=2M
read_rnd_buffer_size=8M
sort_buffer_size=2M
join_buffer_size=4M
binlog_cache_size=2M
tmp_table_size=32M
max_heap_table_size=32M
thread_stack=256K
max_allowed_packet=32M
bulk_insert_buffer_size=64M
############## Binlog ##############
log_bin_index=/data/mysql3306/binlog/binlog/binlog.index
log_bin=/data/mysql3306/binlog/binlog/binlog.bin
relay_log_index=/data/mysql3306/binlog/relaylog/mysqld_relay_bin.index
relay_log=/data/mysql3306/binlog/relaylog/mysqld_relay_bin.bin
binlog_format=row
max_binlog_size=512M
max_binlog_cache_size=18446744073709547520
sync_binlog=1
expire_logs_days=15
relay_log_purge=1
############## slow log options ##############
log_queries_not_using_indexes=1
slow_query_log=1
long_query_time=1
slow_query_log_file=/app/mysql/log/slow_query.log
############## error log options ##############
log_error=/app/mysql/log/mysql_err.log
############## general log options ##############
general_log_file=/app/mysql/log/general.log
general_log=0
############## undo_tablespaces options ##############
#innodb_undo_tablespaces
#innodb_undo_logs
#innodb_undo_directory=/app/mysql/innodb_undots
############## SLAVE Specific options ##############
server-id=96403306
gtid_mode=on
enforce_gtid_consistency=1
master_info_repository=TABLE
relay_log_info_repository=TABLE
sync_master_info=1
slave_max_allowed_packet=1024M
slave_parallel_workers=8
slave_net_timeout=60
master_verify_checksum=1
slave_sql_verify_checksum=1
binlog_rows_query_log_events=1
#slave_skip_errors=1032
replicate_wild_ignore_table=information_schema.%
replicate_wild_ignore_table=performance_schema.%
#auto_increment_offset=2
#auto_increment_increment=2
#read_only=1
log-slave-updates
skip-slave-start
############## Semi-sync replication options ##############
# Master
#rpl_semi_sync_master_enabled=1
#rpl_semi_sync_master_timeout=1000
# Slave
#rpl_semi_sync_slave_enabled=1
############## MyISAM Specific options ##############
# index cache options
key_buffer_size=32M
myisam_sort_buffer_size=128M
myisam_max_sort_file_size=10G
myisam_repair_threads=1
myisam_recover_options=force,backup
############## INNODB Specific options ##############
transaction-isolation=READ-COMMITTED
innodb_file_per_table=1
innodb_buffer_pool_size=24G
innodb_log_buffer_size=16M
innodb_buffer_pool_instances=8
innodb_buffer_pool_load_at_startup=1
innodb_buffer_pool_dump_at_shutdown=1
innodb_data_home_dir=/data/mysql3306/pro_data
innodb_data_file_path=ibdata1:1g;ibdata2:1g;ibdata3:1g;ibdata4:1g:autoextend
innodb_flush_log_at_trx_commit=1
innodb_thread_concurrency=0
innodb_log_file_size=1500M
innodb_log_files_in_group=3
innodb_log_group_home_dir=/data/mysql3306/redolog
innodb_read_io_threads=4
innodb_write_io_threads=4
innodb_io_capacity=2000
innodb_io_capacity_max=8000
innodb_max_dirty_pages_pct=50
innodb_flush_method=O_DIRECT
innodb_lock_wait_timeout=50
innodb_rollback_on_timeout=1
innodb_print_all_deadlocks=1
innodb_stats_on_metadata=off
innodb_force_recovery=0
############## Other options ##############
group_concat_max_len=1844674407370954752
log_bin_trust_function_creators=1
federated
skip-ssl

[mysqldump]
quick
max_allowed_packet=256M
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  mysql