mysql>grant ALL PRIVILEGES on *.* to user1@% identified by "password";
mysql>grant ALL PRIVILEGES on *.* to "root"@"localhost" identified by "password";
mysql>show grants for user1;
mysql>drop user 'user1'@'%';
mysql>revoke ALL PRIVILEGES from 'user1'@'%' identified by "password";
删除空帐户
delete from mysql.user where user='';
为root用户设置密码
update mysql.user set password=password('123456') where user='root';
刷新策略
flush privileges;
阅读(6575) | 评论(0) | 转发(0) |