40 lines
860 B
YAML
40 lines
860 B
YAML
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: mysql
|
|
namespace: mysql
|
|
data:
|
|
custom.cnf: |
|
|
[mysqld]
|
|
# Connection settings
|
|
bind-address=0.0.0.0
|
|
skip-name-resolve
|
|
max_connections=200
|
|
max_allowed_packet=64M
|
|
|
|
# Character set
|
|
character-set-server=utf8mb4
|
|
collation-server=utf8mb4_unicode_ci
|
|
|
|
# Performance tuning
|
|
innodb_buffer_pool_size=512M
|
|
innodb_log_file_size=128M
|
|
innodb_flush_log_at_trx_commit=2
|
|
innodb_flush_method=O_DIRECT
|
|
|
|
# Query optimization
|
|
slow_query_log=1
|
|
long_query_time=2
|
|
slow_query_log_file=/var/lib/mysql/slow-query.log
|
|
|
|
# Timeout settings
|
|
wait_timeout=600
|
|
interactive_timeout=600
|
|
|
|
# Binary logging (optional, for replication)
|
|
# server-id=1
|
|
# log_bin=/var/lib/mysql/mysql-bin
|
|
# binlog_format=ROW
|
|
|
|
[client]
|
|
default-character-set=utf8mb4 |