[ubuntu-us-mi] How to shut down MySQL on Ubuntu Lucid 10.04?

Robert Citek robert.citek at gmail.com
Thu Dec 16 16:26:24 GMT 2010


How does one gracefully shut down MySQL on Ubuntu Lucid 10.04?

I cannot get MySQL to shutdown gracefully.  It keeps restarting:

# (  set -x ; sudo mysqladmin status ; sleep 10 ; sudo mysqladmin
shutdown ; sleep 10 ; sudo mysqladmin status )
+ sudo mysqladmin status
Uptime: 92  Threads: 1  Questions: 7882  Slow queries: 1  Opens: 71
Flush tables: 1  Open tables: 64  Queries per second avg: 85.673
+ sleep 10
+ sudo mysqladmin shutdown
+ sleep 10
+ sudo mysqladmin status
Uptime: 11  Threads: 1  Questions: 919  Slow queries: 1  Opens: 49
Flush tables: 1  Open tables: 42  Queries per second avg: 83.545

This happens despite commenting out the respawn line in the upstart script:

$ grep respawn /etc/init/mysql.conf
# respawn

Using 'sudo /etc/init.d/mysql stop' does stop mysql at the expense of
sending mysqld a KILL after 5 seconds, thus corrupting the innodb
tables.

I found this bug report, which seems close, but not quite what I'm looking for:

https://bugs.launchpad.net/ubuntu/maverick/+source/mysql-dfsg-5.1/+bug/620441

Any pointers greatly appreciated.

Regards,
- Robert



More information about the ubuntu-us-mi mailing list