mysql 數據庫數據遷移 The user specified as a definer ('root'@'%') does not exist 解決方法

從一個數據庫數據遷移到本地localhost


程序在調用到數據庫的視圖時報錯,直接在數據庫中打開視圖時也報錯,相似:

mysql 1449 : The user specified as a definer ('montor'@'%') does not exist


經查,是權限問題,解決辦法:

運行: grant all privileges on *.* to monitor@"%" identified by ".";

以後打開視圖時便不會報錯,程序調用也不會報錯。


源地址的解釋:

權限問題,受權 給 root  全部sql 權限mysql

MySQL> grant all privileges on *.* to root@"%" identified by ".";
Query OK, 0 rows affected (0.00 sec)


mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)sql

相關文章
相關標籤/搜索