Mac OS X 下MySQL的安装、配置及卸载

打开终端,输入:
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.*
posted @ 2015-12-24 22:32  iospp  阅读(2012)  评论(0编辑  收藏  举报