List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:May 4 2001 2:10am
Subject:Re: Column Privilege Question
View as plain text  
At 11:26 AM -0400 5/3/01, David C. Troy wrote:
>Hi, List!
>
>I have a table.  The table has columns A, B, and C.
>
>I want User1 to be able to read columns A,B, and C, but I want User2 to
>only be able to read column A.
>
>Is this possible using MySQL columns_priv security?

Yes, use the GRANT statement.  Something like this:

GRANT SELECT (A,B,C) ON db_name.tbl_name TO user1@host ...
GRANT SELECT (B) ON db_name.tbl_name TO user2@host ...

>
>Thanks,
>Dave
>
>=====================================================================
>David C. Troy   [dave@stripped]                   410-544-6193 Sales
>ToadNet - Want to go fast?                        410-544-1329 FAX
>570 Ritchie Highway, Severna Park, MD 21146-2925  www.toad.net


-- 
Paul DuBois, paul@stripped
Thread
Column Privilege QuestionDavid C. Troy3 May
  • Re: Column Privilege QuestionPaul DuBois4 May