Use mysqladmin to shutdown mysql properly.