完全卸载mysql Remove MySQL completely

starkwang
永久链接: https://shudong.wang/10747.html
  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
阅读 601

前端指北
关注devland团队「[链接]」,每天进步一点。

从事web开发多年,前端、后端、服务架构都有涉猎,经历过大公司、创业公司,擅长前端及公司技术选型。

6.9k 声望
624 粉丝
0 条评论

从事web开发多年,前端、后端、服务架构都有涉猎,经历过大公司、创业公司,擅长前端及公司技术选型。

6.9k 声望
624 粉丝
宣传栏