Bug on CentOS 7: mysql-systemd stop-post


I spent several days to find the answer on the question “Why a failed mysql can not be stopped on CentOS?”.

It seems that start-post and stop-post is the main problems here. If you run stop-post (which by default Percona XtraDB Cluster does) and you have some problems then you won’t be able to stop it. The same things with start-post.

If you will use
systemctl stop mysql

when you are in the next states: activating or deactivating then it won’t work. You can try to kill all the mysql processes with kill -9 but it want work because mysqld_safe will restart them. So, you won’t be able to stop your mysql at all.