Posted on

Good kill, bad kill

They keep doing it! Today, an otherwise bright spark on the #mysql IRC channel on Freenode told another user that to kill the MySQL server process, “kill -9 ” was the way to go.

Please, people… don’t. “kill -9” is the absolute last resort. It does not ask nicely, it does not allow the process to flush buffers, close files and clean things up… it’s like the cleaners ditching the contents of your table while you’re still eating your mail. The results may NOT be pretty.

Sure, it’s very fast and of course a nice way to test ACID compliancy in InnoDB tables 😉
You probably won’t even destroy MyISAM data, though some indexes may need REPAIR.

So, anyway… the proper way would be “kill -15”. That is, if you need to use kill at all.

Posted on