I've a Mysql DB with more than 250 tables, i need to block delete permissions for a single user on a single one of them.
we've already tried with grant but there's permission for delete for this DB, so the grant query for the single table doesn't take effect, i still can delete rows from this table. I did:
GRANT SELECT, INSERT, UPDATE ON db.table TO 'user'@'host';
the global permission:
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER ON `db`.* TO 'user'@'host'
Is there a way to override permissions for a single table or we've to delete the global permissions and set permissions for the user in each table? Maybe some way to set global permission for all (*) except one so the second grant will take effect?
Also tried @kiks73 post:
REVOKE DELETE ON db.table FROM 'user'@'host';
Getting:
ERROR 1147 (42000): There is no such grant defined for user 'user' on host 'host' on table 'table'
But there's the global permission set for this user, including delete permissions for this table.
thanks