I had to completely re-install MySQL on one of the slaves and then rebuild it via a sql dump (we have 1 master and 2 slaves). I tried to SHOW GRANTS for one of the users, but keep getting the following error:
ERROR 1141 (42000): There is no such grant defined for user 'USER' on host '%'
I can SHOW GRANTS for root though. SHOW GRANTS needs a SELECT privilege for the mysql database, which root has:
mysql> show grants;
+---------------------------------------+
| Grants for root@localhost |
+---------------------------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY PASSWORD '*dfdfdfdf' WITH GRANT OPTION |
| GRANT PROXY ON ''@'' TO 'root'@'localhost' WITH GRANT OPTION |
+-----+
2 rows in set (0.01 sec)
Btw, the privileges themselves exist, as I can select them from mysql.user table:
mysql> select update_priv, delete_priv from mysql.user where user like 'USER%';
+-------------+-------------+
| update_priv | delete_priv |
+-------------+-------------+
| Y | Y |
+-------------+-------------+
1 row in set (0.00 sec)
What am I missing?
Edit by RolandoMySQLDBA 2013-01-15 21:06 EDT
1) Please run SELECT VERSION(); to tell me what version of MySQL you are using
2) Please run SELECT COUNT(1) from information_schema.columns WHERE table_schema='mysql' AND table_name='user';
3) Please tell me from what version of mysql did the mysqldump come from.
SELECT User, Host FROM mysql.user WHERE User='USER'? – Derek Downey Jan 15 at 20:15