打开终端,输入:
vi~/.bash_profile
输入i
然后粘贴以下内容
# mysql
alias mysql=‘/usr/local/mysql/bin/mysql‘
alias mysqladmin=‘/usr/local/mysql/bin/mysqladmin‘
# ls
alias ls=‘ls -G‘
按ESC键
输入:
:wq
重启终端程序
修改MySQL的管理员密码:
mysqladmin -u root -p123456
卸载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.*
时间: 2024-10-13 07:50:19