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

Both CentOS service names mysql and mariadb exist ?

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.1.9
    • 10.1.10
    • Platform RedHat
    • None
    • CentOS 7.1 64bit

    Description

      It seems MariaDB changed the service name for CentOS 7 yum packages of MariaDB 10.1.9 ? prior it was service name = mysql but now mariadb ?

      However, both servcie names exist but for mysql service name you get incorrectly reported error that mysql isn't running. CentOS 7 usually can use both service or systemctl versions together.

      Problem Summary

      these 3 work

      service mariadb status
      systemctl status mysql
      systemctl status mariadb

      but this doesn't

      service mysql status

      Problem Details

      service mysql status
       ERROR! MySQL is running but PID file could not be found

      service mariadb status
      Redirecting to /bin/systemctl status  mariadb.service
      mariadb.service - MariaDB database server
         Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled)
        Drop-In: /etc/systemd/system/mariadb.service.d
                 └─migrated-from-my.cnf-settings.conf
         Active: active (running) since Tue 2015-12-01 17:23:15 UTC; 24min ago
       Main PID: 907 (mysqld)
         Status: "Taking your SQL requests now..."
         CGroup: /system.slice/mariadb.service
                 └─907 /usr/sbin/mysqld

      but seems only systemctl mysql service name works like it's mariadb service name counterpart

      systemctl status mysql
      mariadb.service - MariaDB database server
         Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled)
        Drop-In: /etc/systemd/system/mariadb.service.d
                 └─migrated-from-my.cnf-settings.conf
         Active: active (running) since Tue 2015-12-01 17:23:15 UTC; 34min ago
       Main PID: 907 (mysqld)
         Status: "Taking your SQL requests now..."
         CGroup: /system.slice/mariadb.service
                 └─907 /usr/sbin/mysqld

      Attachments

        Issue Links

          Activity

            p4guru George L created issue -
            p4guru George L made changes -
            Field Original Value New Value
            Description It seems MariaDB changed the service name for CentOS 7 yum packages of MariaDB 10.1.9 ? prior it was service name = mysql but now mariadb ?

            However, both servcie names exist but for mysql service name you get incorrectly reported error that mysql isn't running. CentOS 7 usually can use both service or systemctl versions together

            {code:shell}
            service mysql status
             ERROR! MySQL is running but PID file could not be found
            {code}

            {code:shell}
            service mariadb status
            Redirecting to /bin/systemctl status mariadb.service
            mariadb.service - MariaDB database server
               Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled)
              Drop-In: /etc/systemd/system/mariadb.service.d
                       └─migrated-from-my.cnf-settings.conf
               Active: active (running) since Tue 2015-12-01 17:23:15 UTC; 24min ago
             Main PID: 907 (mysqld)
               Status: "Taking your SQL requests now..."
               CGroup: /system.slice/mariadb.service
                       └─907 /usr/sbin/mysqld
            {code}

            but seems only systemctl mysql service name works like it's mariadb service name counterpart

            {code:shell}
            systemctl status mysql
            mariadb.service - MariaDB database server
               Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled)
              Drop-In: /etc/systemd/system/mariadb.service.d
                       └─migrated-from-my.cnf-settings.conf
               Active: active (running) since Tue 2015-12-01 17:23:15 UTC; 34min ago
             Main PID: 907 (mysqld)
               Status: "Taking your SQL requests now..."
               CGroup: /system.slice/mariadb.service
                       └─907 /usr/sbin/mysqld
            {code}


            It seems MariaDB changed the service name for CentOS 7 yum packages of MariaDB 10.1.9 ? prior it was service name = mysql but now mariadb ?

            However, both servcie names exist but for mysql service name you get incorrectly reported error that mysql isn't running. CentOS 7 usually can use both service or systemctl versions together.

            *Problem Summary*

            these 3 work
            {code:shell}service mariadb status
            systemctl status mysql
            systemctl status mariadb{code}
            but this doesn't
            {code:shell}service mysql status{code}

            *Problem Details*

            {code:shell}
            service mysql status
             ERROR! MySQL is running but PID file could not be found
            {code}

            {code:shell}
            service mariadb status
            Redirecting to /bin/systemctl status mariadb.service
            mariadb.service - MariaDB database server
               Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled)
              Drop-In: /etc/systemd/system/mariadb.service.d
                       └─migrated-from-my.cnf-settings.conf
               Active: active (running) since Tue 2015-12-01 17:23:15 UTC; 24min ago
             Main PID: 907 (mysqld)
               Status: "Taking your SQL requests now..."
               CGroup: /system.slice/mariadb.service
                       └─907 /usr/sbin/mysqld
            {code}

            but seems only systemctl mysql service name works like it's mariadb service name counterpart

            {code:shell}
            systemctl status mysql
            mariadb.service - MariaDB database server
               Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled)
              Drop-In: /etc/systemd/system/mariadb.service.d
                       └─migrated-from-my.cnf-settings.conf
               Active: active (running) since Tue 2015-12-01 17:23:15 UTC; 34min ago
             Main PID: 907 (mysqld)
               Status: "Taking your SQL requests now..."
               CGroup: /system.slice/mariadb.service
                       └─907 /usr/sbin/mysqld
            {code}

            p4guru George L made changes -
            Description It seems MariaDB changed the service name for CentOS 7 yum packages of MariaDB 10.1.9 ? prior it was service name = mysql but now mariadb ?

            However, both servcie names exist but for mysql service name you get incorrectly reported error that mysql isn't running. CentOS 7 usually can use both service or systemctl versions together.

            *Problem Summary*

            these 3 work
            {code:shell}service mariadb status
            systemctl status mysql
            systemctl status mariadb{code}
            but this doesn't
            {code:shell}service mysql status{code}

            *Problem Details*

            {code:shell}
            service mysql status
             ERROR! MySQL is running but PID file could not be found
            {code}

            {code:shell}
            service mariadb status
            Redirecting to /bin/systemctl status mariadb.service
            mariadb.service - MariaDB database server
               Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled)
              Drop-In: /etc/systemd/system/mariadb.service.d
                       └─migrated-from-my.cnf-settings.conf
               Active: active (running) since Tue 2015-12-01 17:23:15 UTC; 24min ago
             Main PID: 907 (mysqld)
               Status: "Taking your SQL requests now..."
               CGroup: /system.slice/mariadb.service
                       └─907 /usr/sbin/mysqld
            {code}

            but seems only systemctl mysql service name works like it's mariadb service name counterpart

            {code:shell}
            systemctl status mysql
            mariadb.service - MariaDB database server
               Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled)
              Drop-In: /etc/systemd/system/mariadb.service.d
                       └─migrated-from-my.cnf-settings.conf
               Active: active (running) since Tue 2015-12-01 17:23:15 UTC; 34min ago
             Main PID: 907 (mysqld)
               Status: "Taking your SQL requests now..."
               CGroup: /system.slice/mariadb.service
                       └─907 /usr/sbin/mysqld
            {code}

            It seems MariaDB changed the service name for CentOS 7 yum packages of MariaDB 10.1.9 ? prior it was service name = mysql but now mariadb ?

            However, both servcie names exist but for mysql service name you get incorrectly reported error that mysql isn't running. CentOS 7 usually can use both service or systemctl versions together.

            *Problem Summary*

            these 3 work

            {code:shell}service mariadb status
            systemctl status mysql
            systemctl status mariadb{code}

            but this doesn't

            {code:shell}service mysql status{code}

            *Problem Details*

            {code:shell}
            service mysql status
             ERROR! MySQL is running but PID file could not be found
            {code}

            {code:shell}
            service mariadb status
            Redirecting to /bin/systemctl status mariadb.service
            mariadb.service - MariaDB database server
               Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled)
              Drop-In: /etc/systemd/system/mariadb.service.d
                       └─migrated-from-my.cnf-settings.conf
               Active: active (running) since Tue 2015-12-01 17:23:15 UTC; 24min ago
             Main PID: 907 (mysqld)
               Status: "Taking your SQL requests now..."
               CGroup: /system.slice/mariadb.service
                       └─907 /usr/sbin/mysqld
            {code}

            but seems only systemctl mysql service name works like it's mariadb service name counterpart

            {code:shell}
            systemctl status mysql
            mariadb.service - MariaDB database server
               Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled)
              Drop-In: /etc/systemd/system/mariadb.service.d
                       └─migrated-from-my.cnf-settings.conf
               Active: active (running) since Tue 2015-12-01 17:23:15 UTC; 34min ago
             Main PID: 907 (mysqld)
               Status: "Taking your SQL requests now..."
               CGroup: /system.slice/mariadb.service
                       └─907 /usr/sbin/mysqld
            {code}

            p4guru George L made changes -
            Description It seems MariaDB changed the service name for CentOS 7 yum packages of MariaDB 10.1.9 ? prior it was service name = mysql but now mariadb ?

            However, both servcie names exist but for mysql service name you get incorrectly reported error that mysql isn't running. CentOS 7 usually can use both service or systemctl versions together.

            *Problem Summary*

            these 3 work

            {code:shell}service mariadb status
            systemctl status mysql
            systemctl status mariadb{code}

            but this doesn't

            {code:shell}service mysql status{code}

            *Problem Details*

            {code:shell}
            service mysql status
             ERROR! MySQL is running but PID file could not be found
            {code}

            {code:shell}
            service mariadb status
            Redirecting to /bin/systemctl status mariadb.service
            mariadb.service - MariaDB database server
               Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled)
              Drop-In: /etc/systemd/system/mariadb.service.d
                       └─migrated-from-my.cnf-settings.conf
               Active: active (running) since Tue 2015-12-01 17:23:15 UTC; 24min ago
             Main PID: 907 (mysqld)
               Status: "Taking your SQL requests now..."
               CGroup: /system.slice/mariadb.service
                       └─907 /usr/sbin/mysqld
            {code}

            but seems only systemctl mysql service name works like it's mariadb service name counterpart

            {code:shell}
            systemctl status mysql
            mariadb.service - MariaDB database server
               Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled)
              Drop-In: /etc/systemd/system/mariadb.service.d
                       └─migrated-from-my.cnf-settings.conf
               Active: active (running) since Tue 2015-12-01 17:23:15 UTC; 34min ago
             Main PID: 907 (mysqld)
               Status: "Taking your SQL requests now..."
               CGroup: /system.slice/mariadb.service
                       └─907 /usr/sbin/mysqld
            {code}

            It seems MariaDB changed the service name for CentOS 7 yum packages of MariaDB 10.1.9 ? prior it was service name = mysql but now mariadb ?

            However, both servcie names exist but for mysql service name you get incorrectly reported error that mysql isn't running. CentOS 7 usually can use both service or systemctl versions together.

            *Problem Summary*

            these 3 work

            {code:none}service mariadb status
            systemctl status mysql
            systemctl status mariadb{code}

            but this doesn't

            {code:shell}service mysql status{code}

            *Problem Details*

            {code:shell}
            service mysql status
             ERROR! MySQL is running but PID file could not be found
            {code}

            {code:shell}
            service mariadb status
            Redirecting to /bin/systemctl status mariadb.service
            mariadb.service - MariaDB database server
               Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled)
              Drop-In: /etc/systemd/system/mariadb.service.d
                       └─migrated-from-my.cnf-settings.conf
               Active: active (running) since Tue 2015-12-01 17:23:15 UTC; 24min ago
             Main PID: 907 (mysqld)
               Status: "Taking your SQL requests now..."
               CGroup: /system.slice/mariadb.service
                       └─907 /usr/sbin/mysqld
            {code}

            but seems only systemctl mysql service name works like it's mariadb service name counterpart

            {code:shell}
            systemctl status mysql
            mariadb.service - MariaDB database server
               Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled)
              Drop-In: /etc/systemd/system/mariadb.service.d
                       └─migrated-from-my.cnf-settings.conf
               Active: active (running) since Tue 2015-12-01 17:23:15 UTC; 34min ago
             Main PID: 907 (mysqld)
               Status: "Taking your SQL requests now..."
               CGroup: /system.slice/mariadb.service
                       └─907 /usr/sbin/mysqld
            {code}

            p4guru George L made changes -
            Description It seems MariaDB changed the service name for CentOS 7 yum packages of MariaDB 10.1.9 ? prior it was service name = mysql but now mariadb ?

            However, both servcie names exist but for mysql service name you get incorrectly reported error that mysql isn't running. CentOS 7 usually can use both service or systemctl versions together.

            *Problem Summary*

            these 3 work

            {code:none}service mariadb status
            systemctl status mysql
            systemctl status mariadb{code}

            but this doesn't

            {code:shell}service mysql status{code}

            *Problem Details*

            {code:shell}
            service mysql status
             ERROR! MySQL is running but PID file could not be found
            {code}

            {code:shell}
            service mariadb status
            Redirecting to /bin/systemctl status mariadb.service
            mariadb.service - MariaDB database server
               Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled)
              Drop-In: /etc/systemd/system/mariadb.service.d
                       └─migrated-from-my.cnf-settings.conf
               Active: active (running) since Tue 2015-12-01 17:23:15 UTC; 24min ago
             Main PID: 907 (mysqld)
               Status: "Taking your SQL requests now..."
               CGroup: /system.slice/mariadb.service
                       └─907 /usr/sbin/mysqld
            {code}

            but seems only systemctl mysql service name works like it's mariadb service name counterpart

            {code:shell}
            systemctl status mysql
            mariadb.service - MariaDB database server
               Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled)
              Drop-In: /etc/systemd/system/mariadb.service.d
                       └─migrated-from-my.cnf-settings.conf
               Active: active (running) since Tue 2015-12-01 17:23:15 UTC; 34min ago
             Main PID: 907 (mysqld)
               Status: "Taking your SQL requests now..."
               CGroup: /system.slice/mariadb.service
                       └─907 /usr/sbin/mysqld
            {code}

            It seems MariaDB changed the service name for CentOS 7 yum packages of MariaDB 10.1.9 ? prior it was service name = mysql but now mariadb ?

            However, both servcie names exist but for mysql service name you get incorrectly reported error that mysql isn't running. CentOS 7 usually can use both service or systemctl versions together.

            *Problem Summary*

            these 3 work

            {code:none}service mariadb status
            systemctl status mysql
            systemctl status mariadb{code}

            but this doesn't

            {code:none}service mysql status{code}

            *Problem Details*

            {code:none}
            service mysql status
             ERROR! MySQL is running but PID file could not be found
            {code}

            {code:none}
            service mariadb status
            Redirecting to /bin/systemctl status mariadb.service
            mariadb.service - MariaDB database server
               Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled)
              Drop-In: /etc/systemd/system/mariadb.service.d
                       └─migrated-from-my.cnf-settings.conf
               Active: active (running) since Tue 2015-12-01 17:23:15 UTC; 24min ago
             Main PID: 907 (mysqld)
               Status: "Taking your SQL requests now..."
               CGroup: /system.slice/mariadb.service
                       └─907 /usr/sbin/mysqld
            {code}

            but seems only systemctl mysql service name works like it's mariadb service name counterpart

            {code:none}
            systemctl status mysql
            mariadb.service - MariaDB database server
               Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled)
              Drop-In: /etc/systemd/system/mariadb.service.d
                       └─migrated-from-my.cnf-settings.conf
               Active: active (running) since Tue 2015-12-01 17:23:15 UTC; 34min ago
             Main PID: 907 (mysqld)
               Status: "Taking your SQL requests now..."
               CGroup: /system.slice/mariadb.service
                       └─907 /usr/sbin/mysqld
            {code}

            elenst Elena Stepanova added a comment - - edited

            svoj, danblack,
            We already discussed this before, but there is no way I can intelligibly explain why it works the way it works, so you're up.
            Better still, please somebody document it in the KB, so that we don't have to answer this very reasonable question over and over again (well, we'll still have to, but we'll be doing it by just providing the link).

            Note: by the question I mean why service mysql ... does not work while systemctl mysql ... works.

            elenst Elena Stepanova added a comment - - edited svoj , danblack , We already discussed this before, but there is no way I can intelligibly explain why it works the way it works, so you're up. Better still, please somebody document it in the KB, so that we don't have to answer this very reasonable question over and over again (well, we'll still have to, but we'll be doing it by just providing the link). Note: by the question I mean why service mysql ... does not work while systemctl mysql ... works.
            elenst Elena Stepanova made changes -
            Fix Version/s 10.1 [ 16100 ]
            Assignee Sergey Vojtovich [ svoj ]
            svoj Sergey Vojtovich added a comment - Looks like it was broken by this change: https://github.com/MariaDB/server/commit/fd1b2e486a9a81ffb5416e7a0a0d85d15598c77c
            svoj Sergey Vojtovich made changes -
            Assignee Sergey Vojtovich [ svoj ] Nirbhay Choubey [ nirbhay_c ]
            nirbhay_c Nirbhay Choubey (Inactive) made changes -
            Fix Version/s 10.1.10 [ 20402 ]
            Fix Version/s 10.1 [ 16100 ]
            danblack Daniel Black added a comment -

            Saw _SYSTEMCTL_SKIP_REDIRECT=1 somehow made it into 10.1. Thought that was going to be a 10.0 workaround only (as 10.1 got the galera-new-cluster script).

            I did start the documentation: https://mariadb.com/kb/en/mariadb/systemd/

            For service mysql status to work there would need to be _SYSTEMCTL_SKIP_REDIRECT removed from the 10.1 scripts.

            danblack Daniel Black added a comment - Saw _SYSTEMCTL_SKIP_REDIRECT=1 somehow made it into 10.1. Thought that was going to be a 10.0 workaround only (as 10.1 got the galera-new-cluster script). I did start the documentation: https://mariadb.com/kb/en/mariadb/systemd/ For service mysql status to work there would need to be _SYSTEMCTL_SKIP_REDIRECT removed from the 10.1 scripts.
            nirbhay_c Nirbhay Choubey (Inactive) made changes -
            Status Open [ 1 ] In Progress [ 3 ]

            While all 4 given commands worked for me as expected, _SYSTEMCTL_SKIP_REDIRECT and SYSTEMD_NO_WRAP were not intended for 10.1 as it has systemd support. This bug could have been the side-effect of that.

            https://github.com/MariaDB/server/commit/33f0cf71196d3d2869ccfcbf1c41a0a6709fe8df

            nirbhay_c Nirbhay Choubey (Inactive) added a comment - While all 4 given commands worked for me as expected, _SYSTEMCTL_SKIP_REDIRECT and SYSTEMD_NO_WRAP were not intended for 10.1 as it has systemd support. This bug could have been the side-effect of that. https://github.com/MariaDB/server/commit/33f0cf71196d3d2869ccfcbf1c41a0a6709fe8df
            nirbhay_c Nirbhay Choubey (Inactive) made changes -
            Resolution Fixed [ 1 ]
            Status In Progress [ 3 ] Closed [ 6 ]
            Ahmad Ahmad El-Bardan made changes -
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 72829 ] MariaDB v4 [ 149884 ]

            People

              nirbhay_c Nirbhay Choubey (Inactive)
              p4guru George L
              Votes:
              0 Vote for this issue
              Watchers:
              5 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.