我创建了一个新读者角色并获得以下资助。
+-----------------------------------------------------------+
| Grants for reader@localhost |
+-----------------------------------------------------------+
| GRANT USAGE ON *.* TO `reader`@`localhost` |
| GRANT SELECT ON `freedb_dfjj01`.* TO `reader`@`localhost` |
+-----------------------------------------------------------+
我已将此角色授予 readteam1 用户
| Grants for readteam1@localhost |
+-------------------------------------------------------+
| GRANT USAGE ON *.* TO `readteam1`@`localhost` |
| GRANT `reader`@`localhost` TO `readteam1`@`localhost` |
+-------------------------------------------------------+
用户仍然无法访问freedb_dfjj01
use freedb_dfjj01;
ERROR 1044 (42000): Access denied for user 'readteam1'@'localhost' to database 'freedb_dfjj01'