1.执行 mysql命令,会提示 command not found,需要把mysql的命令映射到 usr/bin中。
MacBook-Pro:/ root# ln -s /usr/local/mysql/bin/mysql /usr/bin
2. mac 上启动mysql
sudo /usr/local/mysql/support-files/mysql.server start sudo /usr/local/mysql/support-files/mysql.server stop sudo /usr/local/mysql/support-files/mysql.server restart
3.下载mysql,打开控制台:
sudo rm /usr/local/mysql
sudo rm -rf /usr/local/mysql*
sudo rm -rf /Library/StartupItems/MySQLCOM
sudo rm -rf /Library/PreferencePanes/My*
vim /etc/hostconfig and removed the line MYSQLCOM=-YES-rm -rf ~/Library/PreferencePanes/My*
sudo rm -rf /Library/Receipts/mysql*
sudo rm -rf /Library/Receipts/MySQL*
sudo rm -rf /var/db/receipts/com.mysql.* 最后这条很多文章都丢了,切记切记。
3. 对某个路径拥有 owner
sudo chown -R mysql /usr/local/mysql/data