Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 1 down vote accepted

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.

share|improve this answer
That combined with a delete of the user via mysqladmin allowed me to get it into a better state. – Kzqai Mar 2 '11 at 2:23

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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