Shahar Shokrani
Shahar Shokrani

Reputation: 8772

How to restrict user to query on information_schema?

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.

Upvotes: 1

Views: 916

Answers (1)

Dawid
Dawid

Reputation: 691

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>";

Upvotes: 1

Related Questions