ERROR 1356 (HY000): View 'information_schema. SCHEMATA'

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;

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章