List:General Discussion« Previous MessageNext Message »
From:Wesley Darlington Date:April 8 2000 8:16pm
Subject:Re: REVOKE select(column) from user?
View as plain text  
Hi,

On Sat, Apr 08, 2000 at 03:37:57PM -0400, Derek Sivers wrote:
> What's the best way to revoke selecting of a single column, from a MySQL user?
> 
> I tried granting them select privileges on the whole table, then revoking 
> privileges for that one column, but that didn't work.  (see below)
> 
> What am I missing??

I don't think you're missing anything. The columns_priv table seems to only 
allow one to say "user can select from this and this and this and this...";
it doesn't seem to allow "user can select from everything but this...".

It looks like you'll have to grant select privilege on every column in 
that table *except* the one to which you don't want to give them access.

'Course, this makes it a bit of a pain when you add new columns. I have
a notion that it'd be tricky to add this feature given the way MySQL ORs 
the various permissions together.

Wesley.
Thread
REVOKE select(column) from user?Derek Sivers8 Apr
  • Re: REVOKE select(column) from user?Wesley Darlington9 Apr