4

I manually installed the MySQL without homebrew

However, I still installed another mysql server by homebrew.

which mysql

/usr/local/bin/mysql

How could I remove the manual installed mysql server, thanks

inline

1 Answer 1

6

To completely uninstall MySQL OS X it is necessary to remove numerous files and folders and edit one file.

To uninstall MySQL and completely remove it (including all databases) from your Mac do the following:

  • Open a Terminal window
  • Use mysqldump to backup your databases to text files!
  • Stop the database server
  • Remove files and folders:

    rm -rf ~/Library/PreferencePanes/My*
    sudo rm /usr/local/mysql
    sudo rm -rf /usr/local/mysql*
    sudo rm -rf /Library/StartupItems/MySQLCOM
    sudo 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*
    sudo rm /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist
    edit /etc/hostconfig and remove the line MYSQLCOM=-YES-
    
1
  • It work with OS X Hight sierra and Mojave, for MySQL 5.7.x, does it with 8.x? Commented Nov 2, 2018 at 2:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .