I'm trying to kill all my mysqld process. But remains one, why?

javier@javier-mbp:~$ ps aux | grep mysqld
root       913  0.0  0.0   4220   704 ?        S    16:11   0:00 /bin/sh /usr/local/mysql/bin/mysqld_safe --datadir=/usr/local/mysql/data --pid-file=/usr/local/mysql/data/javier-mbp.pid
mysql     1408  0.1  2.0 609900 84480 ?        Sl   16:11   0:00 /usr/local/mysql/bin/mysqld --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --plugin-dir=/usr/local/mysql/lib/plugin --user=mysql --log-error=/var/log/mysql/error.log --pid-file=/usr/local/mysql/data/javier-mbp.pid --socket=/var/run/mysqld/mysqld.sock --port=3306
javier    1995  0.0  0.0  13128  1056 pts/0    S+   16:12   0:00 grep --color=auto mysqld
javier@javier-mbp:~$ pkill mysqld
pkill: 913 - Operation not permitted
pkill: 1408 - Operation not permitted
javier@javier-mbp:~$ sudo pkill mysqld
[sudo] password for javier: 
javier@javier-mbp:~$ ps aux | grep mysqld
javier    2020  0.0  0.0  13124  1060 pts/0    S+   16:13   0:00 grep --color=auto mysqld
javier@javier-mbp:~$ 
link|improve this question

50% accept rate
feedback

2 Answers

up vote 8 down vote accepted

The ps command is showing the grep command that you piped to the ps. No instance of mysqld is running.

link|improve this answer
feedback

Try the following command to kill mysqld:

kill -9 `pgrep mysqld`

man kill tells us that KILL (9) is used to force the signal to kill the application.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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