mac mysql 日志 删除_备忘 - Mac下彻底删除MySQL方法

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;

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值