当前位置: > 数据库 > MySQL >

Percona mysql配置文件

时间:2016-05-29 23:21来源:linux.it.net.cn 作者:IT
最近在折腾Percona,顺便记录一下my.cnf的配置

[client]

port            = 3306
socket          = /wls/zabbix-mysql/my3306/run/mysql.3306.sock
loose-default-character-set = utf8

[mysqld]

port            = 3306
socket          = /wls/zabbix-mysql/my3306/run/mysql.3306.sock
server-id              = 146330617
character-set-server   = utf8
default-storage-engine = InnoDB
userstat = 1
innodb_old_blocks_time = 1000
innodb_stats_on_metadata = off
log_slow_verbosity     = microtime,innodb
federated
skip-slave-start
skip-name-resolve
skip-external-locking
log-slave-updates
slave-skip-error        = 1062,1146
slave_net_timeout       = 60
back_log                = 500
max_allowed_packet      = 1073741824
#table_cache             = 8192
max_connections         = 6000
max_connect_errors      = 800
key_buffer              = 64M
sort_buffer_size        = 4M
read_buffer_size        = 2M
read_rnd_buffer_size    = 8M
join_buffer_size        = 2M
tmp_table_size          = 512M
max_heap_table_size     = 512M
binlog_cache_size       = 8M
myisam_sort_buffer_size = 64M
thread_cache_size       = 64
query_cache_type        = 0
slow_query_log          = 1
slow_query_log_file     = /wls/zabbix-mysql/my3306/log/mysql-slow.log
long_query_time         = 1
log-error               = /wls/zabbix-mysql/my3306/log/mysql-error.log
log-bin                 = /wls/zabbix-mysql/my3306/log/mysql-bin
relay_log               = mysql-relay-bin
binlog_format           = ROW
tmpdir                  = /wls/zabbix-mysql/my3306/tmp
thread_concurrency      = 16
secure_auth        = 1
local-infile       = 0
event_scheduler    = OFF
innodb_file_per_table    = 1
innodb_file_format       = barracuda
innodb_file_format_check = barracuda
innodb_open_files        = 4096
datadir                         = /wls/zabbix-mysql/my3306/data/
innodb_data_home_dir            = /wls/zabbix-mysql/my3306/data/
innodb_data_file_path           = ibdata1:1000M;ibdata2:1000M;ibdata3:1000M;ibdata4:100M:autoextend
innodb_log_group_home_dir       = /wls/zabbix-mysql/my3306/data/
innodb_table_locks              = 0
innodb_buffer_pool_size         = 2G
innodb_additional_mem_pool_size = 4M
innodb_log_file_size            = 128M
innodb_log_files_in_group       = 2
innodb_log_buffer_size          = 16M
innodb_flush_method             = O_DIRECT
innodb_flush_log_at_trx_commit  = 0
innodb_max_dirty_pages_pct      = 60     
innodb_write_io_threads         = 16       
innodb_read_io_threads          = 8         
innodb_adaptive_flushing        = 0       
innodb_io_capacity              = 200         
innodb_flush_neighbors          = 0
innodb_thread_concurrency       = 0       

[mysqldump]

quick
max_allowed_packet = 16M

[mysql]

no-auto-rehash

[isamchk]

key_buffer       = 256M
sort_buffer_size = 256M
read_buffer      = 2M
write_buffer     = 2M

[myisamchk]

key_buffer       = 256M
sort_buffer_size = 256M
read_buffer      = 2M
write_buffer     = 2M

[mysqlhotcopy]

interactive-timeout



(责任编辑:IT)
------分隔线----------------------------
栏目列表
推荐内容