Reputation: 305
Imagine that I run this command:
GRANT ALL PRIVILEGES ON *.* TO 'user'@'host';
Now in every new DB, the user has full access. The question is, imagine that at some point I want that those . privileges don't apply to new databases. Is that possible?
I just thought about erasing user and GRANT privileges to the last db's created but it could be quite hard if there are a lot of them... and I wondered if there was a "REVOKE from now on ..." hidden from google command.
Upvotes: 2
Views: 213
Reputation: 1446
Try this, it helped me may be you too
REVOKE ALL on dbName.* from 'user'@'host';
FLUSH PRIVILEGES;
Upvotes: 1
Reputation: 23
maybe you should try this
REVOKE [type of permission] ON [database name].[table name] FROM ‘[username]’@‘localhost’;
CREATE- allows them to create new tables or databases
DROP- allows them to them to delete tables or databases
DELETE- allows them to delete rows from tables
INSERT- allows them to insert rows into tables
SELECT- allows them to use the Select command to read through databases
UPDATE- allow them to update table rows
Upvotes: 0
Reputation: 6132
try this:
REVOKE ALL PRIVILEGES ON *.* FROM user [, user] ...
REVOKE GRANT OPTION ON *.* FROM user [, user] ...
https://dev.mysql.com/doc/refman/4.1/en/revoke.html
Upvotes: 0