Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 10.1, 10.0, 5.5
    • Fix Version/s: 10.1, 10.0
    • Component/s: OTHER
    • Labels:
    • Environment:
      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.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            elenst Elena Stepanova added a comment -

            Hi,

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

            Thanks.

            Show
            elenst Elena Stepanova added a comment - Hi, Please provide your cnf file(s) and specify how you start the server. Thanks.
            Hide
            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
            
            Show
            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
            Hide
            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
            
            Show
            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
            Hide
            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" ;;
            ...
            
            Show
            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" ;; ...

              People

              • Assignee:
                serg Sergei Golubchik
                Reporter:
                carolmazoy Carol
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated: