mirror of
https://github.com/KevinMidboe/playbooks-retailor.git
synced 2026-09-07 13:32:06 +00:00
36 lines
1.5 KiB
Django/Jinja
36 lines
1.5 KiB
Django/Jinja
# Production MySQL config — generated by Ansible for retailor.io. Edit by hand might cause drift!
|
|
|
|
[mysqld]
|
|
bind-address = {{ mysql_bind_address }}
|
|
port = {{ mysql_port }}
|
|
max_connections = {{ mysql_max_connections }}
|
|
server_id = {{ mysql_server_id }}
|
|
|
|
# --- InnoDB ------------------------------------------------------------
|
|
innodb_buffer_pool_size = {{ mysql_innodb_buffer_pool_size }}
|
|
innodb_log_file_size = 512M
|
|
innodb_flush_log_at_trx_commit = 1 # full ACID durability; set to 2 only if you accept losing ~1s of txns on crash
|
|
innodb_flush_method = O_DIRECT
|
|
innodb_file_per_table = 1
|
|
|
|
# --- Replication (GTID-based) -------------------------------------------
|
|
gtid_mode = {{ mysql_gtid_mode }}
|
|
enforce_gtid_consistency = ON
|
|
log_bin = /var/log/mysql/mysql-bin.log
|
|
binlog_format = {{ mysql_binlog_format }}
|
|
binlog_expire_logs_seconds = {{ mysql_binlog_expire_logs_seconds }}
|
|
sync_binlog = 1
|
|
read_only = {{ 'ON' if 'mysql_replica' in group_names else 'OFF' }}
|
|
relay_log = /var/log/mysql/mysql-relay-bin
|
|
|
|
# --- Logging -------------------------------------------------------------
|
|
slow_query_log = 1
|
|
slow_query_log_file = /var/log/mysql/mysql-slow.log
|
|
long_query_time = 2
|
|
log_error = /var/log/mysql/error.log
|
|
|
|
# --- Security --------------------------------------------------------------
|
|
local_infile = 0
|
|
skip_name_resolve = 1
|
|
|