Not the answer you need?
Register and ask your own question!

Percona Server shutdown PID file not deleting

dleedlee EntrantCurrent User Role Beginner
Hi there,

I have two separate servers.

Server 1:
Ubuntu 12.04.2 LTS
Percona Server 5.5 Release 29.4

Server 2:
Ubuntu 12.04.2 LTS
Percona Server 5.5 Release 30.1

Both installed Percona via the apt repo instructions here:

percona.com/doc/percona-server/5.5/installation/apt_repo.htm l

Server 1 and 2 has their pid_file set to /var/run/mysqld/mysqld.pid to reflect what vanilla mysql does.

If I issue a sudo service mysql stop on Server 1, the server shuts down cleanly with no problem. If I do the same on Server 2, mysql will shutdown but it seems that the pid file is not being deleted on shutdown, so mysqld_safe will restart the server again rather than ending the script. On Server 2, I either have to manually delete the pid file and then issue the shutdown or kill the process that's running mysqld_safe and then try shutting down mysql.

To fix this, I just leave out the pid_file setting in /etc/mysql/my.cnf, which defaults to /var/lib/mysql/thehostname.pid. That works perfectly fine and shutdown works correctly.

Permissions look the same on both Server 1 and 2 for all mysql-related directories and their parent directories. This suggests to me that there's been a change between R29.4 and 30.1 where whatever shuts down mysql (the mysqladmin binary?) isn't respecting the pid_file setting in my.cnf upon shutdown/deletion of the pid file.

I'm not sure if this is an issue that's coming from vanilla mysql or percona server. Any ideas?

Comments

  • gmousegmouse Mod Squad Inactive User Role Beginner
    Have you checked whether selinux imposes some restrictions on server 2?
  • dleedlee Entrant Current User Role Beginner
    What I haven't tried was installing Percona Server on a VM to test whether Mysql won't shutdown properly on the VM as well. I just tried it and it works fine, so it looks like there's nothing wrong with Percona/Mysql and that something's just borked on my server (server 2.)

    SELinux isn't installed on the server, but at this point, I've made do with leaving the pid_file location as the default, which works, and I think I'll just leave it at that.
Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.