Unable to stop MySQL on OS X 10.10

ぃ、小莉子 提交于 2021-02-05 18:58:26

问题


I'm starting to go nuts over this. I setup MySQL/Apache/PHP using the tutorial by Coolest Guides On The Planet. I'm guessing something went wrong as its not working as expected so I want to uninstall and try again.

The trouble is that I can't stop MySQL either by system preferences or command line. I keep trying suggestions on the net but so far unsuccessful. Can anyone help?


回答1:


Finally got around the autostart - Thanks to all who contributed and allowed me to see the way.

To stop the auto start I used:

sudo launchctl unload -w /Library/LaunchDaemons/com.mysql.mysql.plist

And to kill the service I used:

sudo pkill mysqld



回答2:


This is what worked for me. It was listed under a different plist name:

sudo launchctl unload -w com.oracle.oss.mysql.mysqld.plist



回答3:


For Mac Users kill -9 {pid} kept restarting the process. This was because I had MySQL Server running. On OSX I had to:

1- System Preferences.

2- Search for mysql.

3- Press the Stop MySQL Server button.

got it from a github issue, and it solved my problem

https://github.com/docker/compose/issues/4950#issuecomment-407145733




回答4:


in terminal

kill `pgrep mysqld`

this kills the mysqld process.




回答5:


I also got the same problem, unable to stop MySql Sever through system preferences on macOS High Sierra.

I did brew uninstall mysql on my terminal window.

now I am able stop stop MySql Sever through system preferences.

Since mysql was installed on my mac 2 ways binary as well as home brew.




回答6:


brew services stop mysql@5.6 worked for me, when all else failed.




回答7:


Try with issuing the following command in command line:

ps -xo pid,ppid,stat,command | grep mysqld

It will show you your processes, with their parent ID in the second column. Look for the mysqld and it's parent process. After locating it, issue a:

sudo kill pid

where pid is mysqld's parent process ID.

EDIT If you want to stop the process from launching again, try:

sudo launchctl unload  /System/Library/LaunchDaemons/mysqld.plist



回答8:


If you used brew then you can find out which version you are using by:

launchctl list|grep mysql

this will print something like

92555   0   homebrew.mxcl.mysql@5.7

In my case I'm using mysql@5.7

You can stop using:

brew services stop mysql@5.7



回答9:


I've installed mysql via homebrew, but stop mysql by using mysql stop command, mysql restart right now. try to execute command as follow if your mysql was installed via homebrew

brew services stop $(brew list | grep mysql)


来源:https://stackoverflow.com/questions/29375253/unable-to-stop-mysql-on-os-x-10-10

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!