When " kill -9 mysqld" is done, the process doesn't get an opportunity to cleanup the children and grandchildren.
If you need to kill the enter process group of mysqld/mysqld_safe and all its children, then you need to run:
kill -9 -$(ps --no-headers -o pgid -C mysqld_safe)
Note the '-' before pid, it is to send SIGKILL to entire process group.
When " kill -9 mysqld" is done, the process doesn't get an opportunity to cleanup the children and grandchildren.
If you need to kill the enter process group of mysqld/mysqld_safe and all its children, then you need to run:
kill -9 -$(ps --no-headers -o pgid -C mysqld_safe)
Note the '-' before pid, it is to send SIGKILL to entire process group.