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;


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM