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) |