45 lines
880 B
Plaintext
45 lines
880 B
Plaintext
|
|
[mysqld]
|
||
|
|
# Basic settings
|
||
|
|
port = 33306
|
||
|
|
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
|
||
|
|
default-storage-engine = innodb
|
||
|
|
innodb_buffer_pool_size = 1G
|
||
|
|
innodb_log_file_size = 256M
|
||
|
|
innodb_log_buffer_size = 64M
|
||
|
|
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
|
||
|
|
query_cache_size = 64M
|
||
|
|
query_cache_type = 1
|
||
|
|
tmp_table_size = 256M
|
||
|
|
max_heap_table_size = 256M
|