Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: 在navicat上创建用户并赋予一个库的查询条件,为什么能 到所有库
[TiDB Usage Environment] Production Environment / Testing / Poc
[TiDB Version]
[Reproduction Path] What operations were performed when the issue occurred
Using the modified user account password to log in can see information about all databases
[Encountered Issue: Issue Phenomenon and Impact]

Hope to see only one database with permissions, is this supported?
[Resource Configuration]
Enter TiDB Dashboard - Cluster Info - Hosts and take a screenshot of this page
[Attachments: Screenshots/Logs/Monitoring]
Show me the statements for creating a user and granting privileges.
Directly done in Navicat.
show grants for xf_xs@‘%’;
Manual execution: Navicat can also be used
Create user test
CREATE USER 'test'@'%' IDENTIFIED BY 'test123!';
Delete user test
DROP USER 'test'@'%';
Grant test user permissions on the test database
GRANT ALL PRIVILEGES ON test.* TO 'test'@'%';
Revoke permissions
REVOKE ALL PRIVILEGES ON test.* FROM 'test'@'%';
In Navicat, you can add a user and assign permissions by selecting the database.
After executing this, you can still see all the databases.
Check if the connection properties in Navicat are configured for a different account. This kind of situation shouldn’t normally occur.
Yes, I have confirmed it several times.
Additionally, check select user, host from mysql.user where user='xf_xs'
to see if there are accounts with the same name but different IP restrictions.
Create a new user and follow the instructions given above.
What is the version number of Navicat?