nixos/mysql: run as mysql user and group
As we don't need to setup data directories from ExecStartPre= scripts anymore, which required root, but use systemd.tmpfiles.rules instead, everything can be run as just the mysql user.
This commit is contained in:
@@ -326,6 +326,8 @@ in
|
||||
'';
|
||||
|
||||
serviceConfig = {
|
||||
User = cfg.user;
|
||||
Group = "mysql";
|
||||
Type = if hasNotify then "notify" else "simple";
|
||||
# /run/mysqld needs to be created in addition to pidDir, as they could point to different locations
|
||||
RuntimeDirectory = "mysqld";
|
||||
|
||||
Reference in New Issue
Block a user