角色已授予,但用户仍无法从数据库中选择

问题描述 投票:0回答:1

我创建了一个新读者角色并获得以下资助。

+-----------------------------------------------------------+
| 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'
sql mysql roles
1个回答
© www.soinside.com 2019 - 2024. All rights reserved.