admin管理员组

文章数量:1638817

出于对infomation_schema虚拟数据库对象权限的不熟悉

在应用提出需要访问innodb_locks数据权限时,想着通过以下方式赋权

mysql> grant select on information_schema.* to 'test'@'%';
ERROR 1044 (42000): Access denied for user 'root'@'localhost' to database 'information_schema'

原因是information_schema数据库的权限是默认对所有用户开放的

再具体访问数据库里面的表数据时,又有如下报错:

mysql> select * from innodb_locks;
ERROR 1227 (42000): Access denied; you need (at least one of) the PROCESS privilege(s) for this operation

该问题可以通过process权限解决

GRANT PROCESS ON *.* TO 'test'@'%'

搞定

转载于:https://wwwblogs/tonnytangy/p/10282685.html

本文标签: 权限对象informationschema