This is not possible in a standard way in MySQL. You would have to use a trigger.
For example, the following compares the value of ID_USER
that was passed in the update statement to the name of the current database user, and aborts the update if they are different, using the SIGNAL syntax to raise the error.
DELIMITER $$
CREATE TRIGGER checkUpdateTable1
BEFORE UPDATE ON Table1
FOR EACH ROW
BEGIN
SELECT 1
FROM mysql.user
INTO @is_root
WHERE super_priv='Y' AND USER() = CONCAT(user, '@', host);
IF (@is_root IS NULL AND NEW.ID_USER <> USER()) THEN
SIGNAL SQLSTATE '45000'
SET MESSAGE_TEXT = 'error message';
END IF
END
$$
DELIMITER ;
NB : after Raymond Nijland's comment, I edited the post to allow SUPER
users to update any row.