You can use a "pre-stop" script/exec to send the proper command to stop mysql and to wait for it to shut down.
You can use a "pre-stop" script/exec to send the proper command to stop mysql and to wait for it to shut down.