34 lines
715 B
INI
34 lines
715 B
INI
[mysqld]
|
|
# Gitea-optimized MySQL configuration
|
|
|
|
# Character set
|
|
character-set-server = utf8mb4
|
|
collation-server = utf8mb4_unicode_ci
|
|
|
|
# InnoDB settings
|
|
innodb_buffer_pool_size = 256M
|
|
innodb_log_file_size = 64M
|
|
innodb_flush_log_at_trx_commit = 2
|
|
innodb_flush_method = O_DIRECT
|
|
|
|
# Connection settings
|
|
max_connections = 200
|
|
max_allowed_packet = 64M
|
|
|
|
# Query cache (disabled in MySQL 8.0+)
|
|
# Performance schema
|
|
performance_schema = ON
|
|
|
|
# Logging
|
|
slow_query_log = 1
|
|
slow_query_log_file = /var/log/mysql/slow-queries.log
|
|
long_query_time = 2
|
|
|
|
# Binary logging for backups
|
|
log_bin = /var/log/mysql/mysql-bin.log
|
|
binlog_expire_logs_seconds = 604800 # 7 days
|
|
max_binlog_size = 100M
|
|
|
|
[client]
|
|
default-character-set = utf8mb4
|