For security reason, I don’t like the auditor has the privilege to modify all the rows of the table. So I tried:
GRANT UPDATE audit_comment ON cgis TO auditor IDENTIFIED BY 'audit@TE';
But it failed
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'audit_comment ON cgis TO auditor IDENTIFIED BY 'audit@TE'' at line 1
I’ve googled a lot, but I couldn’t find the answer, maybe mysql doesn’t allow us to do this?
You cannot specify privileges on rows, just on columns. Check the syntax here
You need something like
GRANT UPDATE (audit_comment) ON db_name.cgis TO 'auditor'@'host_name'