Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm following this guide to reset my mysql root password (I'm on ubuntu). When I kill the mysqld process, it immediately gets resurrected. The parent process ID is 1.

How can I find what keeps resurrecting mysqld?

$ ps -ef | grep mysql
mysql    30136     1  0 07:16 ?        00:00:00 /usr/sbin/mysqld
root     30295 30274  0 07:18 pts/0    00:00:00 grep --color=auto mysql
$ kill -9 30136
$ ps -ef | grep mysql
mysql    30302     1  2 07:18 ?        00:00:00 /usr/sbin/mysqld
root     30404 30274  0 07:18 pts/0    00:00:00 grep --color=auto mysql
share|improve this question
I found that doing stop mysql or /etc/init.d/mysql stop will bring it down for good (use start to start it back up, of course). – ripper234 Jun 25 '11 at 7:27

You already found your answer - but for the sake of clarity.

You should try not to kill daemons or processes which are working okay - and you should certainly try and avoid kill -9. There is usually always a way to request daemons to stop gracefully which allow them to tidy up.

Kill on it's own (e.g. kill 30136 in your case) can sometimes correctly stop a process, but it depends on the process in question and what signals it is looking for.

share|improve this answer
The kill order was from mysql own website ... – ripper234 Jun 26 '11 at 6:09

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.