How do you stop MySQL on a Mac OS install?

前端 未结 20 1431
暗喜
暗喜 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:50

    sudo /opt/local/etc/LaunchDaemons/org.macports.mysql5/mysql5.wrapper stop

    You can also use start and restart here. I found this by looking at the contents of /Library/LaunchDaemons/org.macports.mysql.plist.

    0 讨论(0)
  • 2020-11-30 16:51

    For those who used homebrew to install MySQL use the following commands below to start, stop, or restart MySQL

    Brew start

    /usr/local/bin/mysql.server start
    

    Brew restart

    /usr/local/bin/mysql.server restart
    

    Brew stop

    /usr/local/bin/mysql.server stop
    
    0 讨论(0)
提交回复
热议问题