一个比较复杂的mysql配置文件

[mysqld]

# General
user = mysql
port = 3310
datadir = /data01/mysql3310/data
socket  = /data01/mysql3310/mysql3310.sock
pid-file = /data01/mysql3310/mysql3310.pid

character-set-server = utf8
default-storage-engine = INNODB
init_connect = 'SET NAMES utf8'
open_files_limit = 8192
max_connections = 3000
max_user_connections = 3020
autocommit = 0

# InnoDB
innodb_buffer_pool_size = 20G
innodb_flush_method = O_DIRECT
innodb_thread_concurrency = 64
innodb_io_capacity = 2000
innodb_read_io_threads = 1
innodb_write_io_threads = 16
innodb_change_buffering = inserts
[mysqld]

# General
user = mysql
port = 3310
datadir = /data01/mysql3310/data
socket  = /data01/mysql3310/mysql3310.sock
pid-file = /data01/mysql3310/mysql3310.pid

character-set-server = utf8
default-storage-engine = INNODB
init_connect = 'SET NAMES utf8'
open_files_limit = 8192
max_connections = 3000
max_user_connections = 3020
autocommit = 0

# InnoDB
innodb_buffer_pool_size = 20G
innodb_flush_method = O_DIRECT
innodb_thread_concurrency = 64
innodb_io_capacity = 2000
innodb_read_io_threads = 1
innodb_write_io_threads = 16
innodb_change_buffering = inserts
innodb_log_buffer_size = 64M
innodb_log_file_size = 1G
innodb_log_files_in_group = 3
innodb_open_files = 8192

#innodb_flush_log_at_trx_commit = 1
#innodb_data_file_path = /data01/mysql3310/data/
#innodb_data_home_dir =  ibdata1:2G;ibdata2:2G;ibdata3:2G;autoextend:max:5G

# MyISAM
key_buffer_size = 32M

# Other
query_cache_size = 128M
tmp_table_size = 256M
max_heap_table_size = 1G
thread_cache_size = 64
bulk_insert_buffer_size = 64M
max_binlog_cache_size = 2G
max_binlog_size = 500M

transaction_isolation = read-committed
binlog_format = row

lower_case_table_names = 1
sql_mode = NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

# Logging
log_bin    =  /data01/mysql3310/log/binlog/db83_3310_bin
log-error  =  /data01/mysql3310/log/log/error/db83_3310_error.log
slow_query_log_file = /data01/mysql3310/log/log/slow/db83_3310_slow.log

# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
join_buffer_size = 2M
sort_buffer_size = 2M
read_buffer_size = 2M
read_rnd_buffer_size = 2M

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值