0

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:~$ 

2 Answers 2

10

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

1
  • Yes, and use killall instead of kill Apr 8, 2013 at 5:58
0

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.

1
  • This does not answer the question. The process that the OP believes it's remaining is not mysql but the grep mysql.
    – Matteo
    Apr 8, 2013 at 5:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .