1356 - View "information schema.SCHEMATA' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack
Navicat 链接mysql 数据库报错,
使用mysql终端登陆 show 命令也报错
ERROR 1356 (HY000): View 'information_schema.COLUMNS' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
ERROR 1356 (HY000): View 'information_schema.SCHEMATA' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
报错信息是没有权限,隐约记得改过mysql.user 表的mysql.infoschema权限信息,改的哪个忘了,导致关机重新开机后报上述错误,information_schema库下面的所有视图不能访问
不知道mysql.infoschema的哪个权限跟information_schema的查询有关,以为是Show_view_priv,Show_db_priv,Process_priv影响的但是改完后仍报错,最后尝试修改Select_priv 能正常访问了
执行语句
use mysql;
select * from user where User ='mysql.infoschema';
update user set Select_priv = 'Y' where User = 'mysql.infoschema';
flush privileges;