The steps:
First you need to edit the file in: /etc/hostconfig and remove the line
Since this is a system file I advise you to open it with nano in terminal:
- Open Terminal
- sudo nano /etc/hostconfig
- Enter your password if you’re not authed yet.
- Delete the following line: “MYSQLCOM=-YES-”
- CTRL+X (This is the command for closing NANO, Enter the “Y” key to save the file and exit nano).
Second step:
Make sure MySQL is not running.
- Open Terminal and copy and paste and run the following commands:
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 /etc/my.cnf
MySQL is now removed from your MAC.
时间: 2024-10-27 01:40:52