MySQL----information-schema数据库相关权限的说明。

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的权限也要小心。

    

原文地址:https://www.cnblogs.com/JiangLe/p/4889706.html