基础配置文件--pid文件和socket文件最好在配置文件中指定,这样在软件升级时不会出现问题
percona配置文件生成工具//
--专用mysql服务器,2颗cpu,4核超线程、内存8GB
# Generated by Percona Configuration Wizard () version REL5-20120208
# Configuration name larry_server generated for suifeng5739@126.com at 2015-07-06 07:20:34
[mysql]
# CLIENT #
port = 3306
socket = /mnt/mysql/dbdata/mysql.sock
[mysqld]
# GENERAL #
user = mysql
default-storage-engine = InnoDB
socket = /mnt/mysql/dbdata/mysql.sock
pid-file = /mnt/mysql/dbdata/mysql.pid
# MyISAM #
key-buffer-size = 32M
myisam-recover = FORCE,BACKUP
# SAFETY #
max-allowed-packet = 16M
max-connect-errors = 1000000
# DATA STORAGE #
datadir = /mnt/mysql/dbdata/
# BINARY LOGGING #
log-bin = /mnt/mysql/dbdata/mysql-bin
expire-logs-days = 14
sync-binlog = 1
# CACHES AND LIMITS #
tmp-table-size = 32M
max-heap-table-size = 32M
query-cache-type = 0
query-cache-size = 0
max-connections = 500
thread-cache-size = 50
open-files-limit = 65535
table-definition-cache = 4096
table-open-cache = 200
# INNODB #
innodb-flush-method = O_DIRECT
innodb-log-files-in-group = 2
innodb-log-file-size = 256M
innodb-flush-log-at-trx-commit = 1
innodb-file-per-table = 1
innodb-buffer-pool-size = 6G
# LOGGING #
log-error = /mnt/mysql/dbdata/mysql-error.log
log-queries-not-using-indexes = 1
slow-query-log = 1
slow-query-log-file = /mnt/mysql/dbdata/mysql-slow.log
阅读(1493) | 评论(0) | 转发(0) |