I am trying to remove permission from mysql user to not be able to delete specific database. But if i run this command:
revoke all privileges on test.* from 'demo'@'localhost';
or this
revoke drop on test.* from 'demo'@'localhost';
I get this error
ERROR 1141 (42000): There is no such grant defined for user 'demo' on host 'localhost'
test is the name of the databse.
The permissions for demo user are this:
mysql> show grants for demo@'localhost';
+----------------------------------------------------------------------------------------------------------------------+
| Grants for demo@localhost |
+----------------------------------------------------------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'demo'@'localhost' IDENTIFIED BY PASSWORD '*C142FB215B6E05B7C134B1A653AD4B455157FD79' |
Also, when i login as user demo i am able to delete the database test.
Why i am getting this error when i try to remove the permissions from user demo?