0

I opened mysqld_safe for some reason in Linux but now I can't completely exit or kill it! Closing the terminal didn't help. Then I tried with kill -9 <process id(s)> and I killed 2 processes but can't kill the last one.

This is from WSL though, I tried Parrot OS also and the result was same as this one.

┌──(dr-ph4ntom� DESKTOP-HSC7AGA)-[~] 
└─$ ps aux | grep mysqld_safe
root       120  0.3  0.0  18036  2804 ?          S   18:31  0:00 sudo mysqld_safe
root       121  0.2  0.0  10460   780 ?          S   18:31  0:00 /bin/sh /usr/bin/mysqld_safe
dr-ph4n+   284  0.0  0.0  14292  1224 ? tty2     S   18:32  0:00 grep --color=auto mysqld_safe

┌──(dr-ph4ntom� DESKTOP-HSC7AGA)-[~] 
└─$ sudo kill all mysqld_safe
[sudo] password for dr-ph4ntom:
kill: failed to parse argument: 'all'

┌──(dr-ph4ntom� DESKTOP-HSC7AGA)-[~] 
└─$ sudo killall mysqld_safe                                                                                         1�

┌──(dr-ph4ntom� DESKTOP-HSC7AGA)-[~] 
└─$ ps aux | grep mysqld_safe
root       120  0.0  0.0  18036  2784 ?          S   18:31  0:00 sudo mysqld_safe
root       121  0.0  0.0  10460   780 ?          S   18:31  0:00 /bin/sh /usr/bin/mysqld_safe
dr-ph4n+   311  0.0  0.0  14156  1008 ? tty2     R   18:34  0:00 grep --color=auto mysqld_safe

┌──(dr-ph4ntom� DESKTOP-HSC7AGA)-[~] 
└─$ sudo kill -9 120 121 311
kill: (311): No such process

┌──(dr-ph4ntom� DESKTOP-HSC7AGA)-[~] 
└─$ ps aux | grep mysqld_safe                                                                                       1�
dr-ph4n+   320  0.0  0.0  11264   804 ? tty2     R   18:35  0:00 grep --color=auto mysqld_safe

Now can you please help me by telling how to solve this problem… I am a newbie both in Linux and StackExchange…

0

1 Answer 1

2

What you are seeing appear is the grep process, not the actual mysqld_safe process running. You already successfully killed the mysqld_safe processes.

Try this in terminal instead:

ps aux | grep "[m]ysqld_safe"

And I would be willing to bet nothing will appear. This answer will divine more insight.

That being said, grepping the output of ps is usually OK, but you would probably be better suited to using pgrep instead. A flip through the man pages will make that more clear.

You must log in to answer this question.

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