Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I want to revoke update privielges from 2 columns of table "transact". I want the user to have all access to all other tables and data.

mysql> REVOKE UPDATE (system, consumer) ON ledger.transact FROM 'foo'@'localhost';
ERROR 1147 (42000): There is no such grant defined for user 'foo' on host 'localhost' on table 'transaction'

The above does not seem to work.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
518 views
Welcome To Ask or Share your Answers For Others

1 Answer

I agree with Thilo - you would only be able to revoke those column privileges if you had granted them before. You cannot grant on a higher level (e.g. table) and then revoke on a more detailed level. I think this is described in the mysql reference manual MySql 5.1 chapter 12.7.1.3:

"The privileges for a database, table, column, or routine are formed additively as the logical OR of the privileges at each of the privilege levels. For example, if a user has a global SELECT privilege, the privilege cannot be denied by an absence of the privilege at the database, table, or column level."

To get the selective privileges is described by Devart already.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share

Just Browsing Browsing

[3] html - How to create even cell spacing within a

548k questions

547k answers

4 comments

86.3k users

...