mysql5.6 my.cnf


[client]
default-character-set=utf8
[mysqld]
basedir = /usr/local/mysql
datadir = /home/mysql/data
character-set-server=utf8
collation-server=utf8_general_ci
back_log = 300
max_connections = 5000
max_connect_errors = 300
table-definition-cache=2000
table-open-cache=4000
max_allowed_packet = 32M

max_heap_table_size = 128M
sort_buffer_size = 16M
join_buffer_size = 16M
thread_cache_size = 16
thread_concurrency = 8
query_cache_size = 128M
query_cache_limit = 4M
ft_min_word_len = 8
default-storage-engine=MYISAM
thread_stack = 512K
transaction_isolation = REPEATABLE-READ
tmp_table_size = 128M
slow-query-log
long_query_time = 6

#master config
# grant replication slave, replication client on *.* to 'root'@'192.168.1.131' identified by 'password';
# ref : http://blog.csdn.net/seteor/article/details/17261733
server-id = 1
log-bin=mysql-bin
binlog_cache_size = 4M
binlog_format=mixed
expire_logs_days=3
binlog-ignore-db=test
replicate-ignore-db=test

#slave config
#server_id=2
#binlog-do-db = mydb
#binlog-ignore-db=test #不记录binlog
#replicate-ignore-db=test #不复制test库的binlog
#log-bin=mysql-bin
#binlog_cache_size = 1M
#binlog_format=mixed
#expire_logs_days=3

key_buffer_size = 128M
read_buffer_size = 8M
read_rnd_buffer_size = 64M
bulk_insert_buffer_size = 256M
myisam_sort_buffer_size = 256M
myisam_max_sort_file_size = 10G
myisam_repair_threads = 1
myisam_recover
skip-federated

#innodb config
innodb_additional_mem_pool_size = 64M
innodb_buffer_pool_size = 6G
innodb_data_file_path = ibdata1:10M:autoextend
innodb_file_io_threads = 4
innodb_thread_concurrency = 16
innodb_flush_log_at_trx_commit = 2
innodb_log_buffer_size = 16M
innodb_log_file_size = 512M
innodb_log_files_in_group = 3
innodb_max_dirty_pages_pct = 90
innodb_lock_wait_timeout = 120

[mysqldump]
quick
max_allowed_packet = 32M
[mysql]
no-auto-rehash
[isamchk]
key_buffer = 2048M
sort_buffer_size = 2048M
read_buffer = 32M
write_buffer = 32M
[myisamchk]
key_buffer = 2048M
sort_buffer_size = 2048M
read_buffer = 32M
write_buffer = 32M
[mysqlhotcopy]
interactive-timeout
[mysqld_safe]
open-files-limit = 8192
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值