After assigning single table permissions, an error occurs indicating no database permissions

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: 分配单表权限后,报错说没有库的权限

| username: TiDBer_7Oi7Om69

[TiDB Usage Environment] Production Environment / Test / Poc
Production Environment

[TiDB Version]
6.1.1

[Reproduction Path] What operations were performed that caused the issue
Only assigned a user permission for a single table

[Encountered Issue: Problem Phenomenon and Impact]
Created a new user in TiDB and only assigned read permission for a specific table in a specific database.
When connecting through the client, the database cannot be found, and it reports that there is no permission for that database.
When using SHOW DATABASES, it can be displayed, but the client cannot display it.
This issue was encountered in TiDB 4.0, and it still exists after upgrading to 6.1.

[Resource Configuration]
[Attachments: Screenshots/Logs/Monitoring]
1

22

Seeking advice from experts on the reason for this issue and how to resolve it. The same operation works perfectly fine in MySQL~
Due to this issue, we have to recreate the database in production.

| username: Meditator | Original post link

On the logged-in client, execute

show grants;

to see what permissions the current logged-in user actually has and whether there is any information asymmetry.

| username: weixiaobing | Original post link

The name of the database that reported the error is different from the name of the database you authorized.

| username: Meditator | Original post link

Awesome!
maxcomputer vs maxcompute

| username: TiDBer_7Oi7Om69 | Original post link

My mistake :joy:, but the client still doesn’t display it.

| username: TiDBer_7Oi7Om69 | Original post link

Made a mistake :joy:, the client doesn’t display it.

| username: TiDBer_7Oi7Om69 | Original post link

The permissions are as shown in the picture, but Navicat cannot display that database.

| username: weixiaobing | Original post link

The command line can display it, so it must be a problem with Navicat. Try restarting Navicat and see if it works.

| username: TiDBer_7Oi7Om69 | Original post link

No, different versions of Navicat do not display it. :frowning_face: