mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-11 04:05:40 +03:00
nixos/mysql: fix permission error during first startup (#331296)
This commit is contained in:
commit
dbed5a6265
1 changed files with 6 additions and 0 deletions
|
@ -334,6 +334,12 @@ in
|
|||
|
||||
environment.etc."my.cnf".source = cfg.configFile;
|
||||
|
||||
# The mysql_install_db binary will try to adjust the permissions, but fail to do so with a permission
|
||||
# denied error in some circumstances. Setting the permissions manually with tmpfiles is a workaround.
|
||||
systemd.tmpfiles.rules = [
|
||||
"d ${cfg.dataDir} 0755 ${cfg.user} ${cfg.group} - -"
|
||||
];
|
||||
|
||||
systemd.services.mysql = {
|
||||
description = "MySQL Server";
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue