about summary refs log tree commit diff
path: root/nixos/modules/services/backup
diff options
context:
space:
mode:
authorAaron Andersen <aaron@fosslib.net>2023-05-10 19:57:48 -0400
committerAaron Andersen <aaron@fosslib.net>2023-05-10 19:57:48 -0400
commita73e7383c0d20fcac4588c143ca2aa1efeaa7a79 (patch)
tree3be47e309cb7af93d2d73299e4065242d68c37f5 /nixos/modules/services/backup
parentfe7b996d66e19251cc2bce7f2ac31441b71a56ce (diff)
nixos/automysqlbackup: add some missing permissions
Diffstat (limited to 'nixos/modules/services/backup')
-rw-r--r--nixos/modules/services/backup/automysqlbackup.nix13
1 files changed, 12 insertions, 1 deletions
diff --git a/nixos/modules/services/backup/automysqlbackup.nix b/nixos/modules/services/backup/automysqlbackup.nix
index d0237f196a807..0b75c75f3d159 100644
--- a/nixos/modules/services/backup/automysqlbackup.nix
+++ b/nixos/modules/services/backup/automysqlbackup.nix
@@ -112,7 +112,18 @@ in
 
     services.mysql.ensureUsers = optional (config.services.mysql.enable && cfg.config.mysql_dump_host == "localhost") {
       name = user;
-      ensurePermissions = { "*.*" = "SELECT, SHOW VIEW, TRIGGER, LOCK TABLES, EVENT"; };
+      ensurePermissions = {
+        "*.*" = "SELECT, SHOW VIEW, TRIGGER, LOCK TABLES, EVENT";
+
+        # https://forums.mysql.com/read.php?10,668311,668315#msg-668315
+        "function sys.extract_table_from_file_name" = "execute";
+        "function sys.format_path" = "execute";
+        "function sys.format_statement" = "execute";
+        "function sys.extract_schema_from_file_name" = "execute";
+        "function sys.ps_thread_account" = "execute";
+        "function sys.format_time" = "execute";
+        "function sys.format_bytes" = "execute";
+      };
     };
 
   };