nixos/mysql: fix permission error during first startup (#331296)
This commit is contained in:
@@ -334,6 +334,12 @@ in
|
|||||||
|
|
||||||
environment.etc."my.cnf".source = cfg.configFile;
|
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 = {
|
systemd.services.mysql = {
|
||||||
description = "MySQL Server";
|
description = "MySQL Server";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user