[mysql-cli]
default-character-set=utf8
[mysqld]
#基本优化
user = mysql
skip-name-resolve = ON
port = 3306
bind-address = 0.0.0.0
server_id=1
innodb_file_per_table=ON
#log_bin=/home/mnt/data/bin-log
#relay_log=/home/mnt/data/relay-log
socket=/var/lib/mysql/mysql.sock
datadir=/home/mnt/data
character-set-server=utf8
lower_case_table_name=1
max_allowed_packet=1024M
#生产优化
#innodb
innodb_buffer_pool_size=6G
innodb_log_file_size=4G
innodb_log_buffer_size = 8M
innodb_flush_log_at_trx_commit=2
#innodb_file_per_table=1
innodb_file_io_threads=4
innodb_flush_method=O_DIRECT
innodb_io_capacity=2000
innodb_io_capacity_max=6000
innodb_lru_scan_depth=2000
innodb_thread_concurrency = 0
innodb_additional_mem_pool_size=16M
innodb_autoinc_lock_mode = 2
wait_timeout=31536000
interactive_timeout=31536000
##Binary log/replication
#log-bin = /home/mnt/data/bin-log
#sync_binlog=1
#sync_relay_log=1
#relay-log-info-repository=TABLE
#master-info-repository=TABLE
#expire_logs_days=7
#binlog_format=ROW
#gtid_mode = on
#enforce_gtid_consistency = 1
#log_slave_updates
#transaction-isolation=READ-COMMITTED
#log_error = error.log
#slow_query_log = 1
#slow_query_log_file = slow.log
#log_queries_not_using_indexes = 1
#log_slow_admin_statements = 1
#log_slow_slave_statements = 1
#log_throttle_queries_not_using_indexes = 10
#
#cache
default-storage-engine=innodb
tmp_table_size=512M
character-set-server=utf8
collation-server=utf8_general_ci
skip-external-locking
back_log=1024
key_buffer_size=1024M
thread_stack=256k
read_buffer_size=8M
thread_cache_size=64
query_cache_size=128M
max_heap_table_size=256M
query_cache_type=1
binlog_cache_size = 2M
table_open_cache=128
thread_cache=1024
thread_concurrency=8
join_buffer_size = 1024M
sort_buffer_size = 8M
read_rnd_buffer_size = 8M
#connect
max-connect-errors=10000
max-connections=1000
mysql主配置文件解析
©著作权归作者所有,转载或内容合作请联系作者
- 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
- 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
- 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
推荐阅读更多精彩内容
- 在上一篇MySql高可用学习(一):linux下mysql主从配置的基础上我们继续来学习主主双向同步。 mysql...
- 1.keepalived安装 参考centos7下keepalived1.4.0安装启动卸载章节:https://...