How to stop mysqld

前端 未结 18 849
清酒与你
清酒与你 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:31

    I found the answer here.

    Use

    sudo stop mysql
    
    0 讨论(0)
  • 2020-12-04 05:31

    On OSX 10.8 and on, the control for MySQL is available from the System Configs. Open System Preferences, click on Mysql (usually on the very bottom) and start/stop the service from that pane. https://dev.mysql.com/doc/refman/5.6/en/osx-installation-launchd.html

    The plist file is now under /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist

    0 讨论(0)
  • 2020-12-04 05:32

    When mysql was installed with Homebrew, the following command did the trick for me:

    brew services stop mysql
    
    0 讨论(0)
  • 2020-12-04 05:33

    Worked for me on mac

    a) Stop the process

    sudo launchctl list | grep -i mysql
    

    If the result shows anything like: "xxx.xxx.mysqlxxx"

    sudo launchctl remove xxx.xxx.mysqlxxx
    

    Example: sudo launchctl remove org.macports.mysql56-server

    b) Disable to autostart the process

    sudo launchctl unload -wF /Library/LaunchDaemons/xxx.xxx.mysqlxxx.plist
    

    Example: sudo launchctl unload -wF /Library/LaunchDaemons/org.macports.mysql56-server.plist

    • Finally reboot your mac

    Note: In some cases if you tried "a)" first, you need to reboot again before try b).

    0 讨论(0)
  • 2020-12-04 05:35

    For mysql 5.7 downloaded from binary file onto MacOS:

    sudo launchctl load -F /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist
    sudo launchctl unload -F /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist
    
    0 讨论(0)
  • 2020-12-04 05:36

    I did it with next command:

    sudo killall mysqld
    
    0 讨论(0)
提交回复
热议问题