[mysql]
default-character-set=utf8mb4

[mysqld]
# 基本设置
character-set-server=utf8mb4
collation-server=utf8mb4_unicode_ci
init_connect='SET NAMES utf8mb4'

# 性能优化
innodb_buffer_pool_size=256M
innodb_log_file_size=64M
innodb_flush_log_at_trx_commit=1
innodb_flush_method=O_DIRECT

# 连接设置
max_connections=200
wait_timeout=28800
interactive_timeout=28800

# 日志设置
general_log=0
slow_query_log=1
slow_query_log_file=/var/lib/mysql/mysql-slow.log
long_query_time=2

# 其他设置
sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
lower_case_table_names=1
