Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MySQL configuration on startup fails when trying to set up users #1007

Closed
M-arcus opened this issue Mar 14, 2024 · 4 comments · Fixed by #1076
Closed

MySQL configuration on startup fails when trying to set up users #1007

M-arcus opened this issue Mar 14, 2024 · 4 comments · Fixed by #1076
Labels
bug Something isn't working

Comments

@M-arcus
Copy link
Contributor

M-arcus commented Mar 14, 2024

Describe the bug
MySQL configuration on startup fails when trying to set up users after updating to newest devenv.lock

To reproduce

{ pkgs, lib, ... }:
{
  services.mysql.enable = true;
  services.mysql.package = lib.mkDefault pkgs.mysql80;
  services.mysql.initialDatabases = [{ name = "db"; }];
  services.mysql.ensureUsers = [{
    name = "db";
    password = "db";
    ensurePermissions = { "*.*" = "ALL PRIVILEGES"; };
  }];
  processes.entryscript.exec = ''
    ${pkgs.coreutils}/bin/sleep infinity
  '';
}

works.

But adding this breaks the devenv up command:

  services.mysql.settings = {
    mysql = {
      user = "db";
      password = "db";
      host = "127.0.0.1";
    };
  };

Error log:

10:59:42 mysql-configure.1 | mysqld is alive
10:59:42 mysql-configure.1 | ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

Version

$ devenv version
devenv: 0.6.3
@M-arcus M-arcus added the bug Something isn't working label Mar 14, 2024
@M-arcus
Copy link
Contributor Author

M-arcus commented Mar 14, 2024

@schneider-felix mentioned, that this could be the cause
71809bc

@M-arcus
Copy link
Contributor Author

M-arcus commented Mar 26, 2024

@domenkozar @shyim
Looks like it's broken again, executing mysql does not use the configured values anymore.

@domenkozar
Copy link
Member

We really need a test for this

@shyim
Copy link
Contributor

shyim commented Mar 27, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants