Skip to content

Providers still broken with MariaDB 11 #1672

Open
@adoom42

Description

@adoom42

Describe the Bug

#1580 describes it pretty well. The short version is that in MariaDB 11.x community edition, commands like mysql and mysqld don't work. You need to use replacements like mariadb and mariadbd.

#1645 addressed part of the problem, but not all of it. When you try to create resources on MariaDB 11, it fails because the module tries to use mysql / mysqld commands. From a run of puppet agent -t --debug:

Debug: Puppet::Type::Mysql_datadir::ProviderMysql: file mysqld does not exist
Debug: Puppet::Type::Mysql_database::ProviderMysql: file mysql does not exist
Debug: Puppet::Type::Mysql_user::ProviderMysql: file mysql does not exist
Debug: Puppet::Type::Mysql_grant::ProviderMysql: file mysql does not exist

This is because the mysql command is used in providers, ex:

I modified the providers to use mariadb / mariadbd instead and it solved the problem.

Expected Behavior

Add conditional logic to all providers to use the appropriate MariaDB commands when the installed version is >= 11.0.0.

Steps to Reproduce

Perform a Puppet run using an environment that makes use of module providers such as mysql_database.

Environment

Tested using the latest main branch code from 6/11/2025. Clients run RHEL 9 and MariaDB 11.4.5.

# rpm -qa | grep Maria | sort
MariaDB-client-11.4.5-1.el9.x86_64
MariaDB-common-11.4.5-1.el9.x86_64
MariaDB-server-11.4.5-1.el9.x86_64
MariaDB-shared-11.4.5-1.el9.x86_64

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions