【问题标题】:How can root@% grant a user to select all entries in information_schema.Tablesroot@% 如何授予用户选择 information_schema.Tables 中的所有条目
【发布时间】:2021-12-19 05:12:03
【问题描述】:

MySQL 5.7.24

创建用户后,可以

select count(*) from information_schema.Tables

然后得到 50,比方说。 而 root@% 使用相同的 SQL 可以得到 300。

root@% 如何授权创建的用户选择 information_schema.Tables 中的所有条目。

如果我

grant select on information_schema.Tables to test_user;

上面写着:

1044 - Access denied for user 'root'@'%' to database 'information_schema'

所以,我想知道,如何授予创建的用户对 information_schema 的权限。

【问题讨论】:

    标签: mysql information-schema


    【解决方案1】:

    在所有数据库表上授予选择

    grant select on *.* to user
    

    那么你就可以访问information_schema.tables中的所有数据了

    【讨论】:

      猜你喜欢
      • 2018-10-15
      • 1970-01-01
      • 1970-01-01
      • 2016-12-07
      • 2010-09-16
      • 2022-01-18
      相关资源
      最近更新 更多