How do you stop MySQL on a Mac OS install?

前端 未结 20 1434
暗喜
暗喜 2020-11-30 16:08

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)?

20条回答
  •  时光取名叫无心
    2020-11-30 16:36

    On my mac osx yosemite 10.10. This command worked:

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

    You can find your mysql file in folder /Library/LaunchDaemons/ to run

提交回复
热议问题