From f2ccddfaa07287f93efca407df5b2c5fe617e673 Mon Sep 17 00:00:00 2001 From: chn Date: Wed, 4 Jun 2025 11:26:41 +0800 Subject: [PATCH] fix mysql --- nixos/modules/services/databases/mysql.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos/modules/services/databases/mysql.nix b/nixos/modules/services/databases/mysql.nix index 1580fea28af8..7c53a74a5c19 100644 --- a/nixos/modules/services/databases/mysql.nix +++ b/nixos/modules/services/databases/mysql.nix @@ -678,12 +678,12 @@ in ''} ${lib.concatMapStrings (user: '' - ( echo "CREATE USER IF NOT EXISTS '${user.name}'@'localhost' IDENTIFIED WITH ${ + ( echo "CREATE USER IF NOT EXISTS '${user.name}' IDENTIFIED WITH ${ if isMariaDB then "unix_socket" else "auth_socket" };" ${lib.concatStringsSep "\n" ( lib.mapAttrsToList (database: permission: '' - echo "GRANT ${permission} ON ${database} TO '${user.name}'@'localhost';" + echo "GRANT ${permission} ON ${database} TO '${user.name}';" '') user.ensurePermissions )} ) | ${cfg.package}/bin/mysql -N