Details

    • Bug
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • 5.5(EOL), 10.0(EOL), 10.1(EOL)
    • 10.1(EOL)
    • OTHER
    • RHEL 6.5. Tested on 10.0.12-MariaDB-log and 10.0.19-MariaDB-log

    Description

      'pid_file' entry in my.cnf is ignored. PID file is created in datadir as $(hostname).pid.
      'pid-file' works as spected.

      Attachments

        Activity

          Hi,

          Please provide your cnf file(s) and specify how you start the server.

          Thanks.

          elenst Elena Stepanova added a comment - Hi, Please provide your cnf file(s) and specify how you start the server. Thanks.
          carolmazoy Carol added a comment -

          my.cnf attached

          [root@mytest01 ~]# service mysql start
          Starting MySQL.                                            [  OK  ]
          [root@mytest01 ~]# ls -l /var/run/mysql/
          total 0
          srwxrwxrwx 1 mysql mysql 0 May 18 12:15 3306.sock
          [root@mytest01 ~]# ls -l /var/lib/data1/mysql/3306/
          total 110716
          -rw-rw---- 1 mysql mysql    16384 May 18 12:15 aria_log.00000001
          -rw-rw---- 1 mysql mysql       52 May 18 12:15 aria_log_control
          -rw-rw---- 1 mysql mysql        6 May 18 12:15 mytest01.local.lan.pid
          -rw-rw---- 1 mysql mysql 12582912 May 18 12:15 ibdata1
          -rw-rw---- 1 mysql mysql 50331648 May 18 12:15 ib_logfile0
          -rw-rw---- 1 mysql mysql 50331648 May 18 11:53 ib_logfile1
          -rw-rw---- 1 mysql mysql        0 May 18 11:56 multi-master.info
          drwx------ 2 mysql root      4096 May 18 11:53 mysql
          drwx------ 2 mysql mysql     4096 May 18 11:53 performance_schema
          drwx------ 2 mysql root      4096 May 18 11:53 test

          carolmazoy Carol added a comment - my.cnf attached [root@mytest01 ~]# service mysql start Starting MySQL. [ OK ] [root@mytest01 ~]# ls -l /var/run/mysql/ total 0 srwxrwxrwx 1 mysql mysql 0 May 18 12:15 3306.sock [root@mytest01 ~]# ls -l /var/lib/data1/mysql/3306/ total 110716 -rw-rw---- 1 mysql mysql 16384 May 18 12:15 aria_log.00000001 -rw-rw---- 1 mysql mysql 52 May 18 12:15 aria_log_control -rw-rw---- 1 mysql mysql 6 May 18 12:15 mytest01.local.lan.pid -rw-rw---- 1 mysql mysql 12582912 May 18 12:15 ibdata1 -rw-rw---- 1 mysql mysql 50331648 May 18 12:15 ib_logfile0 -rw-rw---- 1 mysql mysql 50331648 May 18 11:53 ib_logfile1 -rw-rw---- 1 mysql mysql 0 May 18 11:56 multi-master.info drwx------ 2 mysql root 4096 May 18 11:53 mysql drwx------ 2 mysql mysql 4096 May 18 11:53 performance_schema drwx------ 2 mysql root 4096 May 18 11:53 test
          carolmazoy Carol added a comment -

          Could be related to issue MDEV-6095?

          root     28189     1  0 13:00 pts/0    00:00:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/data1/mysql/3306/ --pid-file=/var/lib/data1/mysql/3306//mytest01.local.lan.pid
          mysql    28396 28189  3 13:00 pts/0    00:00:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/data1/mysql/3306/ --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/var/log/mysql/3306-error.log --pid-file=/var/lib/data1/mysql/3306//mytest01.local.lan.pid --socket=/var/run/mysql/3306.sock

          carolmazoy Carol added a comment - Could be related to issue MDEV-6095 ? root 28189 1 0 13:00 pts/0 00:00:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/data1/mysql/3306/ --pid-file=/var/lib/data1/mysql/3306//mytest01.local.lan.pid mysql 28396 28189 3 13:00 pts/0 00:00:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/data1/mysql/3306/ --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/var/log/mysql/3306-error.log --pid-file=/var/lib/data1/mysql/3306//mytest01.local.lan.pid --socket=/var/run/mysql/3306.sock

          Thank you.

          It's a problem of the service init script (mysql.server.sh).
          While mysqld_safe handles both dash and underscore in the options that it reads from the server config, the service script does not:

          mysql.server.sh

          ...
                --log-basename=*|--hostname=*|--loose-log-basename=*)
                  mysqld_pid_file_path=`echo "$arg.pid" | sed -e 's/^[^=]*=//'`
                  ;;
                --pid-file=*) mysqld_pid_file_path=`echo "$arg" | sed -e 's/^[^=]*=//'` ;;
                --service-startup-timeout=*) service_startup_timeout=`echo "$arg" | sed -e 's/^[^=]*=//'` ;;
          ...

          mysqld_safe.sh

          ...
               --basedir=*) MY_BASEDIR_VERSION="$val" ;;
                --datadir=*|--data=*) DATADIR="$val" ;;
                --pid[-_]file=*) pid_file="$val" ;;
                --plugin[-_]dir=*) PLUGIN_DIR="$val" ;;
          ...

          elenst Elena Stepanova added a comment - Thank you. It's a problem of the service init script (mysql.server.sh). While mysqld_safe handles both dash and underscore in the options that it reads from the server config, the service script does not: mysql.server.sh ... --log-basename=*|--hostname=*|--loose-log-basename=*) mysqld_pid_file_path=`echo "$arg.pid" | sed -e 's/^[^=]*=//'` ;; --pid-file=*) mysqld_pid_file_path=`echo "$arg" | sed -e 's/^[^=]*=//'` ;; --service-startup-timeout=*) service_startup_timeout=`echo "$arg" | sed -e 's/^[^=]*=//'` ;; ... mysqld_safe.sh ... --basedir=*) MY_BASEDIR_VERSION="$val" ;; --datadir=*|--data=*) DATADIR="$val" ;; --pid[-_]file=*) pid_file="$val" ;; --plugin[-_]dir=*) PLUGIN_DIR="$val" ;; ...
          faust Faustin Lammler added a comment - Same report here https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=874370

          People

            serg Sergei Golubchik
            carolmazoy Carol
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

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