Home > OS >  How to restrict user to query on information_schema?
How to restrict user to query on information_schema?

Time:08-30

How is possible to restrict user from querying this query:

SELECT * FROM information_schema."tables"

As for the moment I onyl gave him Can Login:

enter image description here

And no memberships: enter image description here

But login as this user this query still returns results.

CodePudding user response:

This disallow everything on the information_schema.tables:

revoke all privileges on table information_schema."tables" from "<username>";

You can fine tune the restriction for instance only the read access:

revoke select on table information_schema."tables" from "<username>";
  • Related