Mysql的参数/变量 的含义和设置


my.cnf 文件内容如下


[mysql]

# CLIENT #

port                          = 3306

socket                        = /data/mysql/mysql.sock

default-character-set          = utf8

[mysqld]

# GENERAL #

user                          = mysql

default_storage_engine        = InnoDB

socket                        = /data/mysql/mysql.sock

pid-file                      = /data/mysql/mysql.pid

character-set-server          = utf8

# MyISAM #

key_buffer_size                = 32M

myisam_recover                = FORCE,BACKUP

# SAFETY #

max_allowed_packet            = 16M

max_connect_errors            = 1000000

skip_name_resolve

# DATA STORAGE #

datadir                        = /data/mysql/

# BINARY LOGGING #

log_bin                        = /data/mysql/mysql-bin

expire_logs_days