Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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
1  
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

2 Answers 2

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

 
discard

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.