about summary refs log tree commit diff
path: root/nixos/modules/services/backup/automysqlbackup.nix
diff options
context:
space:
mode:
authorDaniel Poelzleithner <poelzleithner@b1-systems.de>2022-05-12 13:14:29 +0200
committerDaniel Poelzleithner <poelzleithner@b1-systems.de>2022-05-12 13:17:14 +0200
commit64878e3a67c4c4be5926135f6d0270d78461a8b7 (patch)
treee5928a432cdb64a5f0e77047f7a48c16abb117de /nixos/modules/services/backup/automysqlbackup.nix
parentb610a3cf3f9b1f3f23cab413b25f86d3c85422fb (diff)
automysqlbackp: fix missing permissions for mysqldump
automysqldump passes the --events flag, but without the EVENTS permission a error occures:
> mysqldump: Couldn't execute 'show events': Access denied for user 'automysqlbackup'@'localhost' to database 'mysql' (1044)
Diffstat (limited to 'nixos/modules/services/backup/automysqlbackup.nix')
-rw-r--r--nixos/modules/services/backup/automysqlbackup.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/services/backup/automysqlbackup.nix b/nixos/modules/services/backup/automysqlbackup.nix
index fd2764a40ad2f..cf0cb4da32cf1 100644
--- a/nixos/modules/services/backup/automysqlbackup.nix
+++ b/nixos/modules/services/backup/automysqlbackup.nix
@@ -112,7 +112,7 @@ in
 
     services.mysql.ensureUsers = optional (config.services.mysql.enable && cfg.config.mysql_dump_host == "localhost") {
       name = user;
-      ensurePermissions = { "*.*" = "SELECT, SHOW VIEW, TRIGGER, LOCK TABLES"; };
+      ensurePermissions = { "*.*" = "SELECT, SHOW VIEW, TRIGGER, LOCK TABLES, EVENT"; };
     };
 
   };