I have set up some table specific grants in MySQL, but when I log on as that MySQL-user it still has full access to all tables. I'd like to wipe all the GRANTs and start them over.

I'm running a Debian Linux server, using command line commands like:

GRANT INSERT on database.someTable TO 'everyone'@'localhost';

(multiplied times 30 or so.)

Trying to revoke the grants using the single command below just yields some error saying that there wasn't a grant of that type to remove:

REVOKE all on database.* FROM 'everyone'@'localhost';

Do I have to try to reverse engineer the grants and REVOKE them each individually?

1 Answer 1


SHOW GRANTS FOR 'user'@'localhost'; will show you all of the grant commands applied for a given user, you can then change them to revokes to reverse them.

Generally a good idea to run a FLUSH PRIVILEGES; before testing, as well.

  • That combined with a delete of the user via mysqladmin allowed me to get it into a better state.
    – Kzqai
    Mar 2, 2011 at 2:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.