以下在服务器32GB CPU 5520的服务器上配的。
12># less /etc/my.cnf
[mysqld]
datadir=/data/mysql
socket=/tmp/mysql.sock
user=mysql
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
#old_passwords=1
# Disabling symbolic-links is recommended to prevent assorted security risks;
# to do so, uncomment this line:
# symbolic-links=0
skip-locking
skip-name-resolve
max_connections=5000
max_allowed_packet = 32M
table_cache = 512M
key_buffer_size = 2000M
tmp_table_size = 256M
read_buffer_size = 16M
read_rnd_buffer_size = 32M
sort_buffer_size = 64M
wait_timeout = 7200
interactive-timeout = 7200
query_cache_size = 256M
query_cache_type = 1
thread_cache = 100
thread_cache_size = 64
join_buffer_size = 32M
server-id = 10
#binlog_format=mixed
log-bin=mysql-bin
#binlog-do-db = febay
#binlog-ignore-db = mysql
default-storage-engine=InnoDB
#innodb_file_per_table
innodb_additional_mem_pool_size = 128M
innodb_buffer_pool_size = 12G
#innodb_data_file_path = ibdata1:100M:autoextend
innodb_data_file_path = ibdata:10G:autoextend
innodb_file_io_threads = 4
innodb_thread_concurrency = 16
innodb_flush_log_at_trx_commit = 2
innodb_log_buffer_size = 8M
innodb_log_file_size = 512M
innodb_log_files_in_group = 3
innodb_max_dirty_pages_pct = 90
innodb_lock_wait_timeout = 200
#long_query_time = 2
#log-slow-queries = /var/log/mysql_slow.log
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
wait_timeout = 178200
interactive-timeout = 1782000
阅读(653) | 评论(0) | 转发(0) |