【 使用环境 】 测试环境
【 OB or 其他组件 】observer
【 使用版本 】 4.2.1 (社区版)
【问题描述】租户内对用户授权一个 根本不存在的库,授权成功。
【复现路径】
docker exec -it obstandalone ob-mysql root
login as root@test
Command is: obclient -h127.1 -uroot@test -A -Doceanbase -P2881
Welcome to the OceanBase. Commands end with ; or \g.
Your OceanBase connection id is 3221487662
Server version: OceanBase_CE 4.2.1.7 (r107000162024060611-69b64b84b656a4cfa126dab60b4e66dc1bc156ca) (Built Jun 6 2024 11:51:48)
Copyright (c) 2000, 2018, OceanBase and/or its affiliates. All rights reserved.
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
obclient [oceanbase]> show databases;
±-------------------+
| Database |
±-------------------+
| information_schema |
| mysql |
| oceanbase |
| test |
±-------------------+
4 rows in set (0.004 sec)
obclient [oceanbase]> select version();
±-----------------------------+
| version() |
±-----------------------------+
| 5.7.25-OceanBase_CE-v4.2.1.7 |
±-----------------------------+
1 row in set (0.001 sec)
obclient [oceanbase]> create user dev_cluster IDENTIFIED BY ‘123456’;
Query OK, 0 rows affected (0.018 sec)
obclient [oceanbase]> grant all on db_school.* to dev_cluster ;
Query OK, 0 rows affected (0.019 sec)
obclient [oceanbase]> show grants for dev_cluster ;
±-------------------------------------------------------+
| Grants for dev_cluster@% |
±-------------------------------------------------------+
| GRANT USAGE ON . TO ‘dev_cluster’ |
| GRANT ALL PRIVILEGES ON db_school
.* TO ‘dev_cluster’ |
±-------------------------------------------------------+
2 rows in set (0.031 sec)
【附件及日志】无