How to stop mysqld

前端 未结 18 888
清酒与你
清酒与你 2020-12-04 04:32

To find out the start command for mysqld (using a mac) I can do:

ps aux|grep mysql

I get the following output, which allows me to start mys

18条回答
  •  失恋的感觉
    2020-12-04 05:20

    Try:

    /usr/local/mysql/bin/mysqladmin -u root -p shutdown 
    

    Or:

    sudo mysqld stop
    

    Or:

    sudo /usr/local/mysql/bin/mysqld stop
    

    Or:

    sudo mysql.server stop
    

    If you install the Launchctl in OSX you can try:

    MacPorts

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

    Note: this is persistent after reboot.

    Homebrew

    launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
    launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
    

    Binary installer

    sudo /Library/StartupItems/MySQLCOM/MySQLCOM stop
    sudo /Library/StartupItems/MySQLCOM/MySQLCOM start
    sudo /Library/StartupItems/MySQLCOM/MySQLCOM restart
    

    I found that in: https://stackoverflow.com/a/102094/58768

提交回复
热议问题