转自High Performance MySQL
部分参数名称有修改
============Config template=================
[mysqld]
# GENERAL
datadir = /var/lib/mysql
socket = /var/lib/mysql/mysql.sock
pid_file = /var/lib/mysql/mysql.pid
tmpdir = /data/tmp
user = mysql
port = 3306
default_storage_engine = InnoDB
# INNODB
innodb_buffer_pool_size = 256M
innodb_log_file_size = 1G
innodb_file_per_table = 1
innodb_flush_method = O_DIRECT
# MyISAM
key_buffer_size = 256M
# LOGGING
log_error = /var/lib/mysql/mysql-error.log
slow_query_log = 1
slow_query_log_file = /var/lib/mysql/mysql-slow.log
long_query_time = 10
# OTHER
tmp_table_size = 32M
max_heap_table_size = 32M
query_cache_type = 0
query_cache_size = 0
max_connections = 600
thread_cache_size = 60
table_open_cache = 1024
open_files_limit = 65535
[client]
socket = /var/lib/mysql/mysql.sock
port = 3306
阅读(737) | 评论(0) | 转发(0) |