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

[26 Jul 2018 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 2018 16:54] Christian Roser
Commit which caused this behaviour: https://github.com/mysql/mysql-server/commit/ec2a6b6035ed842e39bcecc2c62c39758bda02fb
[7 Aug 2018 12:16] MySQL Verification Team

Thanks for the report, verified as described.

kind regards
[20 Dec 2018 1:17] Paul DuBois
Posted by developer:
Fixed in 5.6.44, 5.7.26, 8.0.15.

mysqladmin shutdown did not wait for mysqld to shut down.
[11 Mar 2019 21:43] Terje Røsten
https://bugs.mysql.com/bug.php?id=94628 is dup.