Fix mysqld shutdown