Bug #89189 mysqladmin shutdown doesn't stop the service on CentOS 7

Submitted: 11 Jan 2018 13:53 Modified: 11 Jan 2018 20:04
Reporter: Evgeniy Patlan (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S2 (Serious)
Version:5.6.38 OS:Any
Assigned to: CPU Architecture:Any

[11 Jan 2018 13:53] Evgeniy Patlan
Description:
Once I tried to stop mysql using `mysqladmin shutdown` command I have found that it is still running.
====================
[root@localhost vagrant]# service mysql status 
Redirecting to /bin/systemctl status  mysql.service 
● mysqld.service - MySQL Community Server 
  Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled) 
  Active: active (running) since Mon 2018-01-08 16:10:22 UTC; 7s ago 
 Process: 3667 ExecStartPost=/usr/bin/mysql-systemd-start post (code=exited, status=0/SUCCESS) 
 Process: 3654 ExecStartPre=/usr/bin/mysql-systemd-start pre (code=exited, status=0/SUCCESS) 
Main PID: 3666 (mysqld_safe) 
  CGroup: /system.slice/mysqld.service 
          ├─3666 /bin/sh /usr/bin/mysqld_safe --basedir=/usr 
          └─3833 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plu... 

Jan 08 16:10:21 localhost.localdomain systemd[1]: mysqld.service holdoff time over, scheduling restart. 
Jan 08 16:10:21 localhost.localdomain systemd[1]: Starting MySQL Community Server... 
Jan 08 16:10:21 localhost.localdomain mysqld_safe[3666]: 180108 16:10:21 mysqld_safe Logging to '/var/log...g'. 
Jan 08 16:10:21 localhost.localdomain mysqld_safe[3666]: 180108 16:10:21 mysqld_safe Starting mysqld daem...sql 
Jan 08 16:10:22 localhost.localdomain systemd[1]: Started MySQL Community Server. 
Hint: Some lines were ellipsized, use -l to show in full. 
[root@localhost vagrant]# mysqladmin shutdown -u root 
[root@localhost vagrant]# service mysql status        
Redirecting to /bin/systemctl status  mysql.service 
● mysqld.service - MySQL Community Server 
  Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled) 
  Active: active (running) since Mon 2018-01-08 16:10:39 UTC; 1s ago 
 Process: 3888 ExecStartPost=/usr/bin/mysql-systemd-start post (code=exited, status=0/SUCCESS) 
 Process: 3875 ExecStartPre=/usr/bin/mysql-systemd-start pre (code=exited, status=0/SUCCESS) 
Main PID: 3887 (mysqld_safe) 
  CGroup: /system.slice/mysqld.service 
          ├─3887 /bin/sh /usr/bin/mysqld_safe --basedir=/usr 
          └─4054 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plu... 

Jan 08 16:10:38 localhost.localdomain systemd[1]: mysqld.service holdoff time over, scheduling restart. 
Jan 08 16:10:38 localhost.localdomain systemd[1]: Starting MySQL Community Server... 
Jan 08 16:10:38 localhost.localdomain mysqld_safe[3887]: 180108 16:10:38 mysqld_safe Logging to '/var/log...g'. 
Jan 08 16:10:38 localhost.localdomain mysqld_safe[3887]: 180108 16:10:38 mysqld_safe Starting mysqld daem...sql 
Jan 08 16:10:39 localhost.localdomain systemd[1]: Started MySQL Community Server. 
Hint: Some lines were ellipsized, use -l to show in full. 
[root@localhost vagrant]# mysql 
Welcome to the MySQL monitor.  Commands end with ; or \g. 
Your MySQL connection id is 3 
Server version: 5.6.38 MySQL Community Server (GPL) 

Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. 

Oracle is a registered trademark of Oracle Corporation and/or its 
affiliates. Other names may be trademarks of their respective 
owners. 

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. 

mysql> ^DBye
=======================

How to repeat:
In order to reproduce there are following steps:
1 Install mysql-community version 5.6.38
2 Start mysql (sudo service mysql start)
3 Check that it is running (sudo service mysql status)
4 Try to stop mysql using mysqladmin (sudo mysqladmin shutdown -p)
5 Check mysql status (sudo service mysql status)
[11 Jan 2018 20:04] MySQL Verification Team
Thank you for the bug report.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.050 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.