【已解决】"SHOW ALL GRANTS"中出现" (false)"的原因

Viewed 34

环境信息

Server version: 5.7.99
Doris version:doris-1.2.8-rc01-Unknown
docker version:26.1.3 Community
集群中1FE,1BE:

# docker ps
CONTAINER ID   IMAGE                           COMMAND                  CREATED          STATUS          PORTS     NAMES
af3a4bc43a6b   doris-1.2.8-be-x64:1.2.8-slim   "/opt/apache-doris/b…"   35 minutes ago   Up 35 minutes             be
5ce79a50f87d   doris-1.2.8-fe-x64:1.2.8-slim   "/opt/apache-doris/f…"   47 minutes ago   Up 47 minutes             fe

问题

我刚使用docker搭建了单FE单BE的集群,查看用户时,出现了标题所说的输出:

MySQL [information_schema]> show all grants;
+--------------+----------+-------------------------------+--------------+---------------+------------+---------------+
| UserIdentity | Password | GlobalPrivs                   | CatalogPrivs | DatabasePrivs | TablePrivs | ResourcePrivs |
+--------------+----------+-------------------------------+--------------+---------------+------------+---------------+
| 'root'@'%'   | No       | Node_priv Admin_priv  (false) | NULL         | NULL          | NULL       | NULL          |
| 'admin'@'%'  | No       | Admin_priv  (false)           | NULL         | NULL          | NULL       | NULL          |
+--------------+----------+-------------------------------+--------------+---------------+------------+---------------+
2 rows in set (0.001 sec)

同时查看角色时,发现存在权限重复的情况,如”Admin_priv Admin_priv“:

MySQL [information_schema]> show roles;
+----------+-------------+---------------------------------------------+--------------+---------------+------------+---------------+
| Name     | Users       | GlobalPrivs                                 | CatalogPrivs | DatabasePrivs | TablePrivs | ResourcePrivs |
+----------+-------------+---------------------------------------------+--------------+---------------+------------+---------------+
| admin    | 'admin'@'%' | Admin_priv  Admin_priv                      | NULL         | NULL          | NULL       | NULL          |
| operator | 'root'@'%'  | Node_priv Admin_priv  Node_priv Admin_priv  | NULL         | NULL          | NULL       | NULL          |
+----------+-------------+---------------------------------------------+--------------+---------------+------------+---------------+
2 rows in set (0.002 sec)

请问这样输出的原因是什么?

1 Answers

老版本显示问题,可以使用 2.0.x 的版本测验对比下。