Comment 3 for bug 1208865

Revision history for this message
Tomislav Plavcic (tplavcic) wrote :

@zoxa:
From you output I see you are using packages for centos7.
Here's my output on centos7 with specified pid-file and it seems to work ok.

INSTALLED PACKAGES:
[vagrant@t-centos7-64 ~]$ sudo yum list installed|grep Percona-Server
Percona-Server-client-55.x86_64 5.5.43-rel37.2.el7 @percona-release-x86_64
Percona-Server-server-55.x86_64 5.5.43-rel37.2.el7 @percona-release-x86_64
Percona-Server-shared-55.x86_64 5.5.43-rel37.2.el7 @percona-release-x86_64

MY.CNF FILE:
...
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

STATUS:
[vagrant@t-centos7-64 ~]$ sudo systemctl status mysqld
mysqld.service - MySQL Percona Server
   Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled)
   Active: active (running) since Sri 2015-05-13 08:54:22 CEST; 11s ago
  Process: 13925 ExecStartPost=/usr/bin/mysql-systemd post (code=exited, status=0/SUCCESS)
  Process: 13891 ExecStartPre=/usr/bin/mysql-systemd pre (code=exited, status=0/SUCCESS)
 Main PID: 13924 (mysqld_safe)
   CGroup: /system.slice/mysqld.service
           ├─13924 /bin/sh /usr/bin/mysqld_safe
           └─14056 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/var/log/mysqld.log --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/lib/mysql/mysql.so...

SHUTDOWN:
[vagrant@t-centos7-64 ~]$ sudo systemctl stop mysqld
[vagrant@t-centos7-64 ~]$ sudo systemctl status mysqld
mysqld.service - MySQL Percona Server
   Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled)
   Active: inactive (dead) since Sri 2015-05-13 08:55:01 CEST; 15s ago
  Process: 13925 ExecStartPost=/usr/bin/mysql-systemd post (code=exited, status=0/SUCCESS)
  Process: 13924 ExecStart=/usr/bin/mysqld_safe (code=exited, status=0/SUCCESS)
  Process: 13891 ExecStartPre=/usr/bin/mysql-systemd pre (code=exited, status=0/SUCCESS)
 Main PID: 13924 (code=exited, status=0/SUCCESS)

[vagrant@t-centos7-64 ~]$ ps aux|grep mysqld
vagrant 14100 0.0 0.1 112640 992 pts/0 S+ 08:55 0:00 grep --color=auto mysqld

If I disable the pid-file option the pid-file is specified in /var/lib/mysql/t-centos7-64.pid and it starts and stops also ok.

Are you using packages on another distribution or something else is different?