'How to completely kill a mysql process and then uninstall it and then install a new one?

I use ps ax | grep mysql to check my PID. I got:

42950 s000 R+ 0:00.00 grep mysql

And then I use sudo kill -9 42950 to kill the process. But, I got

kill: 42950: No such process

After running ps ax | grep mysql, it will give me PID dynamically. I searched some other posts about this issue, like here: how to kill mysql process using mac. But, I find people used MySQL preference pane in mac system preference to stop the mysql server. But, in my case, I can't even open the prefereence pane, this is what I got after clicking on the pane button: error warning I got

I found a post that is talking about how to completely remove mysql on mac: https://bugs.mysql.com/bug.php?id=89293. But, it seems that I need to make sure the process is not running.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source