user1800997
user1800997

Reputation: 183

Revoking permissions from user on specific tables?

I have granted all permissions on a database to a user 'demo' with this command:

grant all privileges on wordpress.* to demo@localhost;

Now i want to revoke the user permissions on the table wp_users. I used this command:

revoke all privileges on wordpress.wp_users from demo@localhost;

But i get this error:

ERROR 1147 (42000): There is no such grant defined for user 'demo' on host 'localhost' on table 'wp_users'

Why i am getting this error?

Upvotes: 0

Views: 439

Answers (1)

Lightness Races in Orbit
Lightness Races in Orbit

Reputation: 385274

Because, as indicated, you're trying to revoke a grant that doesn't exist.

Making a broad grant makes a broad grant; it doesn't automatically make lots of individual grants that you can then cherry-pick away afterwards.

Simply grant access to the tables you want.

Upvotes: 1

Related Questions