Creating a New User in TiDB Database to View a Specific Data Table

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

Original topic: tidb数据库创建新用户查看数据库中的某个数据表

| username: TiDBer_16XPM24c

To create a new user ‘test’ in the TiDB database and assign the ‘oc_c_user’ table to the ‘test’ user, use the following command:

GRANT ALL PRIVILEGES ON test.oc_c_user TO 'test'@'%' IDENTIFIED BY 'test@#9_cg' WITH GRANT OPTION;

Then, use the Navicat tool to connect to the ‘oc_c_user’ table with the ‘test’ user. If the database is not displayed, how can this be resolved?

| username: caiyfc | Original post link

Using FLUSH PRIVILEGES; can make the changes take effect immediately.
flush-privileges

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.