美文网首页
Remove MySQL completely

Remove MySQL completely

作者: 刘家小四 | 来源:发表于2017-09-21 15:38 被阅读80次

    Remove MySQL completely

    1. Open the Terminal

    2. Use mysqldump to backup your databases

    3. Check for MySQL processes with: ps -ax | grep mysql

    4. Stop and kill any MySQL processes

    5. Analyze MySQL on HomeBrew:

      brew remove mysql
      brew cleanup
      
    6. Remove files:

      sudo rm /usr/local/mysql
      sudo rm -rf /usr/local/var/mysql
      sudo rm -rf /usr/local/mysql*
      sudo rm ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
      sudo rm -rf /Library/StartupItems/MySQLCOM
      sudo rm -rf /Library/PreferencePanes/My*
      
    7. Unload previous MySQL Auto-Login:

      launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
      
    8. Remove previous MySQL Configuration:

      subl /etc/hostconfig` 
      # Remove the line MYSQLCOM=-YES-
      
    9. Remove previous MySQL Preferences:

      rm -rf ~/Library/PreferencePanes/My*
      sudo rm -rf /Library/Receipts/mysql*
      sudo rm -rf /Library/Receipts/MySQL*
      sudo rm -rf /private/var/db/receipts/*mysql*
      
    10. Restart your computer just to ensure any MySQL processes are killed

    11. Try to run mysql, it shouldn't work

    相关文章

      网友评论

          本文标题:Remove MySQL completely

          本文链接:https://www.haomeiwen.com/subject/wwzzsxtx.html