How to “subtract” privileges in MySQL

后端 未结 4 983
暖寄归人
暖寄归人 2020-12-19 10:20

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 UP         


        
4条回答
  •  暖寄归人
    2020-12-19 10:59

    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.

提交回复
热议问题