Quick quiz: when can this happen? When can revoking a privilege from a user “grant” them another privilege?
I try to select from a table, and am denied.
(bentest@db3) [test]> select * from gbidsuggestion_0616
limit 1;
ERROR 1142 (42000): SELECT command denied to user
‘bentest’@'db4.adapt.com’ for table
‘gbidsuggestion_0616′
As super, I connect and revoke a different permission for user
‘bentest@db4.adapt.com’
(root@localhost) [test]> revoke insert on test.* from
bentest@’db4.adapt.com’;
Query OK, 0 rows affected (0.00 sec)
Now I log back in as the original user, and I can do the select.
(bentest@db3) [test]> select * from gbidsuggestion_0616
limit 1;
+————————–+…+———+
| gbidsuggestionid |… | active |
+————————–+…+———+
| 1 |… | 0 |
…