Do MySQL privileges really work like this?
November 22, 2010 11:46 AM Subscribe
With MySQL 5.0, how can I grant SELECT privileges on everything *except* for one column in one table?
posted by chengjih to Computers & Internet (13 answers total)
I need to create a read-only user that can query all the tables in the database except for one particular column of one table.
Do I have to do something ridiculous like:
GRANT SELECT ON DB.TABLE1 TO user;
GRANT SELECT ON DB.TABLE2 TO user;
GRANT SELECT ON DB.TABLE3 TO user;
GRANT SELECT(COLUMN1) ON DB.TABLE0 TO user;
GRANT SELECT(COLUMN2) ON DB.TABLE0 TO user;
GRANT SELECT(COLUMN3) ON DB.TABLE0 TO user;
So that TABLE0.COLUMN0 will not be available to "user"?