From 49d1122ee57105f734a256956b2bded9992e5fd1 Mon Sep 17 00:00:00 2001 From: h7x4 Date: Wed, 28 Jan 2026 14:53:55 +0900 Subject: [PATCH] bicep/mysql: enable slow query logs --- hosts/bicep/services/mysql.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hosts/bicep/services/mysql.nix b/hosts/bicep/services/mysql.nix index 6b8d478..cbb6a3b 100644 --- a/hosts/bicep/services/mysql.nix +++ b/hosts/bicep/services/mysql.nix @@ -24,6 +24,9 @@ in # This was needed in order to be able to use all of the old users # during migration from knakelibrak to bicep in Sep. 2023 secure_auth = 0; + + slow-query-log = 1; + slow-query-log-file = "/var/log/mysql/mysql-slow.log"; }; }; @@ -76,6 +79,8 @@ in serviceConfig = { BindPaths = [ "${dataDir}:${cfg.dataDir}" ]; + LogsDirectory = "mysql"; + IPAddressDeny = "any"; IPAddressAllow = [ values.ipv4-space