myuser@'%'
has UPDATE
and INSERT
grants on table1
.
I tried to run this UPDATE
:
UPDATE table1 SET column1 = 'blahblah' WHERE id = 123;
I got this error:
SELECT command denied to user 'myuser'@'localhost' for column 'id' in table 'table1'
... and error code 1143.
Of course, I understand that the particular UPDATE
I was trying to run needs to pick just the particular row I want, probably using the equivalent of a SELECT
statement "under the hood" so to speak, to find the row identified by id = 123, but it doesn't seem right that I should need the SELECT
grant when I'm not doing an explicit SELECT
.
Can someone help me understand the logic that calls for a SELECT
grant for this very common sort of UPDATE
?
UPDATE
andINSERT
grants on the table level oftable1
. – dbdemon Jan 17 '20 at 11:19