MariaDB: Applied optimized production server.cnf and enabled audit logging.
This commit is contained in:
49
conf/mariadb/server.cnf
Normal file
49
conf/mariadb/server.cnf
Normal file
@@ -0,0 +1,49 @@
|
||||
[server]
|
||||
|
||||
[mysqld]
|
||||
# Optimized for Aether Dev (based on production Linode config)
|
||||
slow_query_log = ON
|
||||
long_query_time = 1
|
||||
expire_logs_days = 90
|
||||
max_binlog_size = 512M
|
||||
max_connections = 500
|
||||
wait_timeout = 1800
|
||||
net_read_timeout = 900
|
||||
net_write_timeout = 900
|
||||
interactive_timeout = 1800
|
||||
connect_timeout = 90
|
||||
max_allowed_packet = 128M
|
||||
key_buffer_size = 64M
|
||||
|
||||
# Buffer Settings
|
||||
join_buffer_size = 16M
|
||||
read_buffer_size = 4M
|
||||
read_rnd_buffer_size = 8M
|
||||
sort_buffer_size = 16M
|
||||
innodb_buffer_pool_size = 512M
|
||||
innodb_sort_buffer_size = 32M
|
||||
innodb_open_files = 4096
|
||||
|
||||
query_cache_type = ON
|
||||
query_cache_size = 32M
|
||||
query_cache_limit = 4M
|
||||
|
||||
max_heap_table_size = 384M
|
||||
tmp_table_size = 384M
|
||||
table_open_cache = 4000
|
||||
|
||||
[galera]
|
||||
|
||||
[embedded]
|
||||
|
||||
[mariadb]
|
||||
plugin_load_add = server_audit
|
||||
server_audit=FORCE_PLUS_PERMANENT
|
||||
server_audit_file_path=/var/log/mysql/mariadb-audit.log
|
||||
server_audit_logging=ON
|
||||
server_audit_events = 'CONNECT,TABLE'
|
||||
|
||||
# skip-name-resolve helps significantly with Docker network overhead
|
||||
skip-name-resolve
|
||||
|
||||
[mariadb-10.11]
|
||||
@@ -58,6 +58,7 @@ services:
|
||||
MYSQL_PASSWORD: ${AE_DB_PASSWORD}
|
||||
volumes:
|
||||
- ./srv/mariadb:/var/lib/mysql
|
||||
- ./conf/mariadb/server.cnf:/etc/mysql/conf.d/server.cnf
|
||||
ports:
|
||||
- "3306:3306"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user