Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-33550

MariaDB server fails to start when basedir set to anything

    XMLWordPrintable

Details

    Description

      Server fails to start when basedir is set in config file, even if it's set to a default value of /usr.

      Steps to reproduce:

      • install mariadb-server
      • set basedir=/usr in config
      • start service

      Error:
      2024-02-27 11:32:51 0 [ERROR] mariadbd: Can't open shared library '/usr/provider_lz4.so' (errno: 2, cannot open shared object file: No such file or directory)
      2024-02-27 11:32:51 0 [ERROR] Couldn't load plugins from 'provider_lz4.so'.
      2024-02-27 11:32:51 0 [ERROR] /usr/libexec/mariadbd: unknown variable 'provider_lz4=force_plus_permanent'
      2024-02-27 11:32:51 0 [ERROR] Aborting

      Specifically, it's /usr/libexec/mariadb-prepare-db-dir that is failing.

      Steps to reproduce with docker:

      • docker run --rm -it quay.io/centos/centos:stream9 bash
      • dnf install -y mariadb-server
      • echo -e "[mysqld]\nbasedir=/usr" >> /etc/my.cnf.d/server.cnf
      • /usr/libexec/mariadb-prepare-db-dir mariadb
      • cat /var/log/mariadb/mariadb.log

      The reason for this is because of the bug in the "mysql_install_db.sh" script here: https://github.com/MariaDB/server/blob/374783c3d9a87170b313a05240dadaa813ec6034/scripts/mysql_install_db.sh#L379

      Bug consists of two issues:
      1. auth_pam.so might not exist unless mariadb-pam package is installed
      2. "$basedir/lib*/mariadb/plugin" is missing in the list of directories

      This results in plugin-dir set to empty string "" which causes the error that /usr/provider_lz4.so is not found.

      I can create a pull request to fix this, but I guess it will be faster for core devs to do it?

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              nuvarov Nikita Uvarov
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.