Quit MySQL without it restarting on El Capitan

前端 未结 8 2585
广开言路
广开言路 2020-12-15 05:29

I\'m running OS X 10.11 El Capitan with its built-in server stack (Apache 2.4.16, MySQL 5.6.26).

I need to quit mysql, but killing the process immediately restarts i

8条回答
  •  孤街浪徒
    2020-12-15 06:18

    On my config I found this:

    $ cat /Library/LaunchDaemons/com.mysql.mysql.plist
    
    
    
    
      
        KeepAlive
        
        Label
        com.mysql.mysqld
        ProgramArguments
        
          /usr/local/mysql/bin/mysqld_safe
          --user=mysql
        
      
    
    

    You need to: change that true tag after KeepAlive to false and unload the daemon as others have suggested. In my case that was: sudo launchctl unload -F /Library/LaunchDaemons/com.mysql.mysql.plist && launchctl load /Library/LaunchDaemons/com.mysql.mysql.plist

    Once the daemon will have restarted with the new config it will not keep mysql from being shut down when you kill it from the preferences.

提交回复
热议问题