MySQL中的information_schema数据库比较特别有如下几个要注意的地方。

  1、就算是一个新创建的用户,也就是说这个用户只有一个usage权限。它都可以查看informatoin_schema中的部分表。

  2、尝试授于grant select  on information_schema.* to 'testuser'@'localhost';#这样总是会出错、可能是mysql中默认就有类似的设定吧。

  3、由于默认情况下用户只能查看information_schema中的部分表,如果要指用户可以查看全部的表,就要授于它process 权限才行。

    grant process on *.* to 'testuser'@'localhost';

    比如说不能执行:select * from INNODB_LOCKS ;提示:ERROR 1227 (42000): Access denied; you need (at least one of) the PROCESS privilege(s) for this operation

  4、MySQL中还有一个与information_schema差不多的数据库它就是test。对于test的权限也要小心。

    

相关文章:

  • 2021-07-25
  • 2021-06-23
  • 2021-12-05
  • 2021-12-05
  • 2022-02-16
  • 2022-12-23
  • 2021-12-05
  • 2021-12-29
猜你喜欢
  • 2021-11-18
  • 2022-01-22
  • 2021-12-05
  • 2021-11-10
  • 2022-12-23
  • 2021-08-05
  • 2021-12-11
相关资源
相似解决方案