- sudo rm -rf /usr/local/mysql
- sudo rm -rf /usr/local/mysql*
- sudo rm -rf /Library/StartupItems/MySQLCOM
- sudo rm -rf /Library/PreferencePanes/My*
- sudo nano /etc/hostconfig (复制前面部分回车,然后删掉这一行: MYSQLCOM=-YES-,control+O回车保存,control+X退出编辑界面)
- sudo 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.*
-------------------------------------------------------------------
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
SET PASSWORD = PASSWORD('123456');
创建用户
mysql> insert into mysql.user(Host,User,authentication_string) values("localhost","phplamp",password("1234"));分配权限
grant all privileges on *.* to 'user'@'localhost' with grant option grant all privileges on *.* to 'user'@'localhost' identified by '123456′;grant all privileges on *.* to 'user'@'%' identified by '123456';
刷新系统权限表
mysql>flush privileges;