Create My MySQL configuration by Percona

时间:2024-01-18 23:02:14

本文地址:http://www.cnblogs.com/yhLinux/p/4013065.html

https://tools.percona.com/

Percona是一款在线自动生成MySQL配置文件的工具,提供的MySQL配置文件做了优化处理。

首先,需要注册,然后按网站上提示选择设置,一共7步。

# Generated by Percona Configuration Wizard (http://tools.percona.com/) version REL5-20120208
# Configuration name server-dev-binary- generated for #**********@.com at -- :: [mysql] # CLIENT #
port =
socket = /usr/local/mysql/data/mysql.sock [mysqld] # GENERAL #
user = mysql
default-storage-engine = InnoDB
socket = /usr/local/mysql/data/mysql.sock
pid-file = /usr/local/mysql/data/mysql.pid # MyISAM #
key-buffer-size = 32M
myisam-recover = FORCE,BACKUP # SAFETY #
max-allowed-packet = 16M
max-connect-errors = # DATA STORAGE #
datadir = /usr/local/mysql/data/ # BINARY LOGGING #
log-bin = /usr/local/mysql/data/mysql-bin
expire-logs-days =
sync-binlog = # CACHES AND LIMITS #
tmp-table-size = 32M
max-heap-table-size = 32M
query-cache-type =
query-cache-size =
max-connections =
thread-cache-size =
open-files-limit =
table-definition-cache =
table-open-cache = # INNODB #
innodb-flush-method = O_DIRECT
innodb-log-files-in-group =
innodb-log-file-size = 64M
innodb-flush-log-at-trx-commit =
innodb-file-per-table =
innodb-buffer-pool-size = 128M # LOGGING #
log-error = /usr/local/mysql/data/mysql-error.log
log-queries-not-using-indexes =
slow-query-log =
slow-query-log-file = /usr/local/mysql/data/mysql-slow.log