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

/etc/init.d/mysql still starts mysqld_safe and mysqld even when mariadb.service is disabled in systemd

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Not a Bug
    • 10.2.31
    • N/A
    • Configuration
    • None
    • CentOS7.7.1908
      MariaDB package versions: 10.2.31-1.el7.centos

    Description

      On systems running the latest CentOS7.7.1908 and MariaDB 10.2.31-1.el7.centos, disabling the MariaDB service with "systemctl disable mariadb" does not prevent the DB starting up again after booting, even though mariadb.service is disabled according to status.

      Behaviour seen:

      The /etc/init.d/mysql script starts up mysqld_safe and mysqld regardless (although using different, presumably default, configuration variables, e.g., for pid and err files). chkconfig is not in use, systemd is supposedly controlling the behaviour.

      Using "systemctl disable mysql" tries to redirect to chkconfig, but this does not achieve anything as the mysql service is not registered with chkconfig.

      The question is how to disable in systemd properly? And furthermore, how is it that disabling mariadb service does not stop the /etc/init.d/mysql script from running.

      Conditions where behaviour is seen:

      Now, this only affects servers upgraded to the latest CentOS and MariaDB where the MariaDB service was originally active. /var/log/messages shows systemd starting/stopping the service on bootup and shutdown (see attachment for logs).

      On servers upgraded from the previous Centos7.6.1810 and MariaDB 10.2.6-1.el7.centos where the service was already stopped with "systemctl disable mariadb", the service remains off as expected after the upgrade. There are no /var/log/messages mentioning mysql or MariaDB on such servers.

      I am assuming this is a regression of some kind, or a side-effect of some added feature between 10.2.6 and 10.2.31 or its systemd unit(s), but looking at the Changelogs does not raise any red flags for me.

      Explanatory Notes:

      The reason we disable MariaDB on a server is because we split the MariaDB service out of a combined application/DB server and place it in a separate server from the application server, in cases where the server load warrants it.
      Thus the application server should no longer run the MariaDB service.
      We still wish to retain the packages for uniformity of package control (and this has not been an issue until now).

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              gernot Gernot Hassenpflug
              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.