mysql配置记录

[mysqld]
datadir=/app/data/mysql
socket=/app/data/mysql/mysql.sock
symbolic-links=0
validate_password=off
default_password_lifetime = 0
max_allowed_packet = 128M
max_connections = 5000
default-storage-engine=INNODB
character-set-server=utf8
collation-server=utf8_general_ci
federated
sql-mode="NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
innodb_buffer_pool_size = 2G
innodb_log_buffer_size=16M
innodb_log_file_size=256M
innodb_log_files_in_group=2
innodb_max_dirty_pages_pct=75
innodb_flush_method=O_DIRECT
innodb_read_io_threads=8
innodb_write_io_threads=10
innodb_thread_concurrency=32
innodb_io_capacity=5000
read_buffer_size=8M
read_rnd_buffer_size=8M
sort_buffer_size=8M
join_buffer_size=4M
tmp_table_size=16M
query_cache_type=0
query_cache_size=0
thread_cache_size = 16
open_files_limit = 65535


innodb_flush_log_at_trx_commit = 2
skip-external-locking
key_buffer_size = 16M
table_open_cache = 64
net_buffer_length = 8K
myisam_sort_buffer_size = 8M
lower_case_table_names=1
bulk_insert_buffer_size = 1M
group_concat_max_len = 204800

symbolic-links=0
log_timestamps=SYSTEM
log-error=/app/logs/mysql/mysqld.log
pid-file=/app/run/mysqld/mysqld.pid
slow-query-log=On
slow_query_log_file=/app/logs/mysql/slow-query.log

[mysql]
auto-rehash
socket=/app/data/mysql/mysql.sock

[client]
default-character-set=utf8
socket=/app/data/mysql/mysql.sock

[myisamchk]
key_buffer_size = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[mysqlhotcopy]
interactive-timeout


原文地址:https://www.cnblogs.com/lizhaojun-ops/p/10682292.html