Unverified Commit dbed5a62 authored by Aleksana's avatar Aleksana Committed by GitHub
Browse files

nixos/mysql: fix permission error during first startup (#331296)

parents 25719eb5 10538b82
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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";