[client]
port = 3306
socket = /home/work/mysql/tmp/mysql.sock
[mysqld]
socket = /home/work/mysql/tmp/mysql.sock
pid-file = /home/work/mysql/tmp/mysql.pid
slow_query_log_file=/home/work/mysql/log/slow.log
log-error=/home/work/mysql/log/error.log
tmpdir = /home/work/mysql/tmp
binlog_format = mix
port = 3306
max_connections=1000
max_user_connections=950
max_connect_errors = 100000
long_query_time = 1
open_files_limit = 8192
slow-query-log = 1
log_queries_not_using_indexes = 1
log_warnings=1
innodb_file_per_table = 1
innodb_data_file_path = ibdata1:2000M;ibdata2:10M:autoextend
innodb_autoextend_increment=20
max_binlog_cache_size=3G
max_binlog_size = 1G
innodb_log_files_in_group=2
innodb_log_file_size=1G
lower_case_table_names
back_log=100
expire_logs_days=15
table_open_cache=1024
thread_cache_size=100
interactive_timeout=172800
wait_timeout=172800
skip-name-resolve
skip-character-set-client-handshake
init-connect = ‘SET NAMES utf8‘
character-set-server=utf8
collation-server=utf8_bin
innodb_thread_concurrency = 16
innodb_max_dirty_pages_pct=80
max_allowed_packet = 64M
innodb_write_io_threads = 8
innodb_read_io_threads = 8
innodb_io_capacity = 2000
#myisam
myisam_sort_buffer_size = 128M
myisam_max_sort_file_size = 10G
myisam_repair_threads = 1
myisam_recover
#global buffers
key_buffer_size = 128M
max_heap_table_size=64M
tmp_table_size=512M
innodb_log_buffer_size=16M
innodb_buffer_pool_size=8G
#innodb_additional_mem_pool_size=32M
query_cache_size=256M
#per thread
read_buffer_size = 128K #only for MyISAM
read_rnd_buffer_size = 128K #only for MyISAM
bulk_insert_buffer_size = 128k #only for MyISAM
join_buffer_size=1024K
binlog_cache_size=32K
sort_buffer_size=1024K
max_length_for_sort_data=8192
#master slave change,the slave prepare for master may be not change.
server-id=1 #slave master not the same
innodb_flush_method=O_DIRECT #slave default FDATASYNC remove it
innodb_flush_log_at_trx_commit=2 #slave 2
sync_binlog=0 #slave 0
log_bin=mysql-bin #slave remove it ;M->S1->S2,S1 mysql-bin,S2 remove it
relay_log=relay-bin
relay_log_index=relay-bin.index
master-info-file=master.info
relay-log-info-file=relay.info
[mysqld_safe]
socket = /home/work/mysql/tmp/mysql.sock
[mysqldump]
quick
max_allowed_packet = 64M
[mysql]
no-auto-rehash
prompt = ‘\[email protected]\h(\d) \R:\m>‘
[isamchk]
key_buffer = 256M
sort_buffer_size = 256M
read_buffer = 8M
write_buffer = 8M
[myisamchk]
key_buffer = 256M
sort_buffer_size = 256M
read_buffer = 8M
write_buffer = 8M
[mysqlhotcopy]
interactive-timeout