Bug #91803 mysqladmin shutdown does not wait for MySQL to shut down anymore
Submitted: 26 Jul 14:56 Modified: 7 Aug 12:16
Reporter: Christian Roser Email Updates:
Status: Verified Impact on me:
Category:MySQL Server: Shell General / Core Client Severity:S2 (Serious)
Version:>= 5.5.57 OS:Linux
Assigned to: CPU Architecture:Any

[26 Jul 14:56] Christian Roser
When I start a MySQL 5.5.57 and greater with mysqld_safe mysqladmin shutdown does not wait for the pid file to disappear. So mysqladmin shutdown exits before mysqld is down.

This is caused by introducing a new variable in mysqld_safe:


The value which gets assigned to pid_file_append isn't the absolute path to the pid but only `hostname.pid`. 

How to repeat:
# start MySQL with mysqld_safe (don't specify --pid-file)
# stop mysql from any directory except the datadirectory with mysqladmin shutdown

Suggested fix:
remove pid_file_append variable and replace it with pid_file variable
[26 Jul 16:54] Christian Roser
Commit which caused this behaviour: https://github.com/mysql/mysql-server/commit/ec2a6b6035ed842e39bcecc2c62c39758bda02fb
[7 Aug 12:16] Bogdan Kecman

Thanks for the report, verified as described.

kind regards