比較全而標準的mysql配置
port = 3311
socket = /data/app/run/mysql-3311.sock
[mysqld]
port = 3311
socket = /data/app/run/mysql-3311.sock
skip-external-locking
skip-name-resolve
key_buffer_size = 512M
max_allowed_packet = 16M
table_open_cache = 2048
sort_buffer_size = 4M
read_buffer_size = 4M
read_rnd_buffer_size = 8M
myisam_sort_buffer_size = 64M
thread_cache_size = 64
query_cache_size = 64M
max_connections = 8192
tmp_table_size = 256M
back_log = 512
innodb_flush_log_at_trx_commit = 0
innodb_buffer_pool_size = 4096M
innodb_data_file_path = ibdata1:1024M:autoextend
innodb_log_file_size = 2G
innodb_log_buffer_size = 16M
innodb_flush_method = O_DIRECT
innodb_file_per_table = 1
datadir = /data/app/db/mysql-3311
explicit_defaults_for_timestamp
default-time-zone = Asia/Shanghai
slow-query-log
slow-query-log-file = /data/app/db/mysql-3311/slow.log
long_query_time = 0.1
log_queries_not_using_indexes
log-bin = mysql-bin
expire_logs_days = 3
server_id = 2
relay-log = mysql-slave-relay-bin
replicate-ignore-db = mysql
replicate-ignore-db = performance_schema
replicate-ignore-db = sys
master-info-repository = table
relay-log-info-repository = table
relay-log-recovery = 1
[mysqldump]
quick
max_allowed_packet = 16M
[mysql]
prompt = "\
no-auto-rehash
[myisamchk]
key_buffer_size = 256M
sort_buffer_size = 256M
read_buffer = 2M
write_buffer = 2M
[mysqlhotcopy]
interactive-timeout
[mysqld_safe]
open-files-limit = 8192
pid-file = /data/app/run/mysql-3311.pid
log-error = /data/app/db/mysql-3311/error.log
具體各引數具體作用,可以到這裡
https://dev.mysql.com/doc/refman/5.6/en/server-options.html
查詢,或者後續補齊