58 lines
1.2 KiB
Plaintext
58 lines
1.2 KiB
Plaintext
|
|
[mysqld]
|
||
|
|
# Basic settings for containerized environment
|
||
|
|
port = 3306
|
||
|
|
bind-address = 0.0.0.0
|
||
|
|
server-id = 1
|
||
|
|
|
||
|
|
# Data directory
|
||
|
|
datadir = /var/lib/mysql
|
||
|
|
|
||
|
|
# Character set
|
||
|
|
character-set-server = utf8mb4
|
||
|
|
collation-server = utf8mb4_unicode_ci
|
||
|
|
|
||
|
|
# Log settings
|
||
|
|
log-error = /var/log/mysql/error.log
|
||
|
|
slow-query-log = 1
|
||
|
|
slow-query-log-file = /var/log/mysql/slow.log
|
||
|
|
long_query_time = 2
|
||
|
|
|
||
|
|
# Connection settings
|
||
|
|
max_connections = 200
|
||
|
|
max_connect_errors = 6000
|
||
|
|
open_files_limit = 65535
|
||
|
|
|
||
|
|
# InnoDB settings optimized for container
|
||
|
|
default-storage-engine = innodb
|
||
|
|
innodb_buffer_pool_size = 256M
|
||
|
|
innodb_log_file_size = 64M
|
||
|
|
innodb_log_buffer_size = 16M
|
||
|
|
innodb_flush_log_at_trx_commit = 2
|
||
|
|
innodb_lock_wait_timeout = 50
|
||
|
|
|
||
|
|
# Security
|
||
|
|
skip-name-resolve
|
||
|
|
|
||
|
|
# Binary log (for replication)
|
||
|
|
log-bin = mysql-bin
|
||
|
|
binlog-format = ROW
|
||
|
|
expire_logs_days = 7
|
||
|
|
|
||
|
|
# Performance settings for container
|
||
|
|
query_cache_size = 32M
|
||
|
|
query_cache_type = 1
|
||
|
|
tmp_table_size = 64M
|
||
|
|
max_heap_table_size = 64M
|
||
|
|
|
||
|
|
# Timeout settings
|
||
|
|
interactive_timeout = 60
|
||
|
|
wait_timeout = 60
|
||
|
|
net_read_timeout = 30
|
||
|
|
net_write_timeout = 60
|
||
|
|
|
||
|
|
# Network settings
|
||
|
|
max_allowed_packet = 64M
|
||
|
|
|
||
|
|
# Container specific settings
|
||
|
|
# Reduce memory usage for container environment
|
||
|
|
innodb_buffer_pool_instances = 1
|