MySQL/Mariadb 生产配置
生产配置
[client]
port = 3306
socket = /var/lib/mysql/mysql.sock
[mysqld_safe]
socket = /var/lib/mysql/mysql.sock
nice = 0
[mysqld]
skip-name-resolve
skip-host-cache
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/lib/mysql/mysql.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
skip-external-locking
bind-address = 0.0.0.0
key_buffer = 16M
max_allowed_packet = 16M
thread_stack = 192K
thread_cache_size = 8
myisam-recover = BACKUP
query_cache_limit = 1M
query_cache_size = 16M
log_error = /var/log/mysqld.log
expire_logs_days = 10
max_binlog_size = 100M
open-files-limit = -1
max_connections = 1024
default-storage-engine = InnoDB
[mysqldump]
quick
quote-names
max_allowed_packet = 16M
[mysql]
[isamchk]
key_buffer = 16M
!includedir /etc/my.cnf.d