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

mysql80 package failing to start #14

Open
MPietrukowski opened this issue Oct 11, 2024 · 1 comment
Open

mysql80 package failing to start #14

MPietrukowski opened this issue Oct 11, 2024 · 1 comment

Comments

@MPietrukowski
Copy link

Database change to mysql80 in magento2 template is failing to start.
I've changed package = pkgs.mariadb_106 to package = pkgs.mysql80;

first error I encountered was unknown variable 'query_cache_limit=1M'. I've fixed that by removing query_cache_size and query_cache_limit variables which have been removed in removed in MySQL 8.0.3.

# DATABASE
    services.mysql = {
        enable = true;
        #package = pkgs.mariadb_106;
	package = pkgs.mysql80;
        settings = {
            mysqld = {
                port = config.env.DEVENV_DB_PORT;
                innodb_buffer_pool_size = "2G";
                table_open_cache = "2048";
                sort_buffer_size = "8M";
                join_buffer_size = "8M";
                #query_cache_size = "256M";
                #query_cache_limit = "2M";
            };
        };
        initialDatabases = [{ name = "${config.env.DEVENV_DB_NAME}"; }];
        ensureUsers = [
            {
                name = "${config.env.DEVENV_DB_USER}";
                password = "${config.env.DEVENV_DB_PASS}";
                ensurePermissions = { "${config.env.DEVENV_DB_NAME}.*" = "ALL PRIVILEGES"; };
            }
        ];
    };

second error I see now Table 'mysql.plugin' doesn't exist
SCR-20241011-pgwg

@mwr
Copy link
Member

mwr commented Oct 14, 2024

Did you boot the mariadb database before switching to mysql?

It can be that the state the mariadb left is not compatible with mysql8.
Ideally you make sure the environment is stopped, then remove the .devenv/state/mysql directory, and finally start it again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants