标签:
一、安装
mysql> grant all privileges on *.* to ‘root‘@‘%‘ identified by ‘123456‘ with grant option;
mysql> flush privileges;
二、调试:
# service mysqld stop
2.屏蔽权限
# mysqld_safe --skip-grant-table
屏幕出现: Starting demo from .....
3.新开启一个终端输入
# mysql -u root mysql
mysql> delete from user where USER=‘‘; //从用户表中删除匿名用户(空用户名的用户)
mysql> FLUSH PRIVILEGES; //使修改生效,否则如果关闭先前的终端,又会出现原来的错误
mysql> quit
标签:
原文地址:http://www.cnblogs.com/wangshi-work/p/5177139.html