如何在Mac OS安装上停止MySQL? [英] How do you stop MySQL on a Mac OS install?
本文介绍了如何在Mac OS安装上停止MySQL?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我通过 MacPorts 安装了MySQL.我需要停止服务器的命令是什么(我需要测试MySQL死后应用程序的行为)?
I installed MySQL via MacPorts. What is the command I need to stop the server (I need to test how my application behave when MySQL is dead)?
推荐答案
There are different cases depending on whether you installed MySQL with the official binary installer, using MacPorts, or using Homebrew:
sudo port load mysql57-server
sudo port unload mysql57-server
注意:这在重新启动后仍然存在.
Note: this is persistent after a reboot.
launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
二进制安装程序
sudo /Library/StartupItems/MySQLCOM/MySQLCOM stop
sudo /Library/StartupItems/MySQLCOM/MySQLCOM start
sudo /Library/StartupItems/MySQLCOM/MySQLCOM restart
这篇关于如何在Mac OS安装上停止MySQL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文