'User has access to tables but cannot see it under schema
I have created a user, Sales_Person, that is only allowed access to two tables. When I open the connection, using SELECT*FROM works on the tables I need it to, but the user cannot see said tables under the database when I click the arrow to expand it.
CREATE USER IF NOT EXISTS Sales_Person@localhost IDENTIFIED BY '123';
GRANT SELECT ON final_project.payment TO Sales_Person@localhost;
GRANT SELECT ON final_project.invoice TO Sales_Person@localhost;
Solution 1:[1]
After the grantor grant privileges, execute flush privileges; . Then log in MySQL using the said user and make sure the user@host name is exactly Sales_Person@localhost by using select user(); . Next, run show grants; to verify its privileges. If nothing is wrong, run select * from final_project.payment; . If the result set is displayed accordingly but the table remains hidden under schema, try hitting the refresh all option .
Well, as I'm not able to see the image due to some internet regulations, I just took a guess that it happened in workbench.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |

