【问题标题】:mysql grant select privilege on only one table and some columns of itmysql仅授予一张表及其某些列的选择权限
【发布时间】:2014-04-06 22:29:26
【问题描述】:

我有一个大约 10 列的表格 我创建了一个没有权限选择的用户。

现在我希望它只授予该表的选择权限,如果可能的话,只授予 2-3 列。

【问题讨论】:

    标签: mysql sql datatable grant


    【解决方案1】:

    https://dev.mysql.com/doc/refman/5.1/en/grant.html#grant-column-privileges

    GRANT SELECT (col1,col2) ON database.table TO 'someuser'@'localhost' IDENTIFIED BY 'password';
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-07-06
      • 2019-04-13
      • 2015-06-26
      • 1970-01-01
      • 2021-12-24
      • 1970-01-01
      • 2015-02-13
      • 2011-09-07
      相关资源
      最近更新 更多