Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1686060
  • 博文数量: 391
  • 博客积分: 8464
  • 博客等级: 中将
  • 技术积分: 4589
  • 用 户 组: 普通用户
  • 注册时间: 2008-12-13 15:12
个人简介

狮子的雄心,骆驼的耐力,孩子的执著!

文章分类

全部博文(391)

文章存档

2023年(4)

2018年(9)

2017年(13)

2016年(18)

2014年(7)

2013年(29)

2012年(61)

2011年(49)

2010年(84)

2009年(95)

2008年(22)

分类: Mysql/postgreSQL

2012-06-13 15:27:27

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;

阅读(6533) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~