Chinaunix首页 | 论坛 | 博客
  • 博客访问: 388766
  • 博文数量: 166
  • 博客积分: 1972
  • 博客等级: 上尉
  • 技术积分: 1845
  • 用 户 组: 普通用户
  • 注册时间: 2010-07-19 21:16
文章分类

全部博文(166)

文章存档

2013年(7)

2010年(159)

分类: Mysql/postgreSQL

2010-10-12 16:16:31

  • mysql> USE yoohouse_alpha;
  • DATABASE changed
  • mysql> SHOW grants FOR ydb;
  • +----------------------------------------------------------------------------------------------------+
  • | Grants FOR ydb@% |
  • +----------------------------------------------------------------------------------------------------+
  • | GRANT USAGE ON *.* TO 'ydb'@'%' IDENTIFIED BY PASSWORD '*2DD3A4894A6C05E80F16754C1F59EB9E659AEA5D' |
  • | GRANT ALL PRIVILEGES ON `member`.* TO 'ydb'@'%' |
  • | GRANT ALL PRIVILEGES ON `yoohouse_estate`.* TO 'ydb'@'%' |
  • | GRANT ALL PRIVILEGES ON `yoohouse_alpha`.* TO 'ydb'@'%' |
  • +----------------------------------------------------------------------------------------------------+
  • 4 rows IN SET (0.00 sec)
  •  
  • mysql> GRANT ALL PRIVILEGES ON dw.* TO ydb@'%' IDENTIFIED BY 'ydb2009!@#$';
  • Query OK, 0 rows affected (0.02 sec)
  •  
  • mysql> SHOW grants FOR ydb;
  • +----------------------------------------------------------------------------------------------------+
  • | Grants FOR ydb@% |
  • +----------------------------------------------------------------------------------------------------+
  • | GRANT USAGE ON *.* TO 'ydb'@'%' IDENTIFIED BY PASSWORD '*ABAC751648E921941D928207BF7FFAC003FB795A' |
  • | GRANT ALL PRIVILEGES ON `member`.* TO 'ydb'@'%' |
  • | GRANT ALL PRIVILEGES ON `dw`.* TO 'ydb'@'%' |
  • | GRANT ALL PRIVILEGES ON `yoohouse_estate`.* TO 'ydb'@'%' |
  • | GRANT ALL PRIVILEGES ON `yoohouse_alpha`.* TO 'ydb'@'%' |
  • +----------------------------------------------------------------------------------------------------+
  • 5 rows IN SET (0.00 sec)
  • mysql> DELETE FROM mysql WHERE User='ydb';
  • ERROR 1146 (42S02): TABLE 'mysql.mysql' doesn't exist
  • mysql> delete from mysql.user where User='ydb';
  • Query OK, 1 row affected (0.00 sec)
  • mysql> mysql> flush privileges;
  • Query OK, 0 rows affected (0.04 sec)
  • mysql> grant all privileges on member.* to ydb@'%' identified by 'ydb2009!@#$}';
  • Query OK, 0 rows affected (0.00 sec)
  •  
  • mysql> grant all privileges on yoohouse_estate.* to ydb@'%' identified by 'ydb2009!@#$}';
  • Query OK, 0 rows affected (0.00 sec)
  •  
  • mysql> grant all privileges on yoohouse_alpha.* to ydb@'%' identified by 'ydb2009!@#$}';
  • Query OK, 0 rows affected (0.00 sec)
  •  
  • mysql> grant all privileges on dw.* to ydb@'%' identified by 'ydb2009!@#$}';
  • Query OK, 0 rows affected (0.01 sec)
  •  
  • 阅读(867) | 评论(0) | 转发(0) |
    给主人留下些什么吧!~~