The user specified as a definer ('xxx'@'%') does not exist的解決辦法
出現(xiàn)這個問題是因為從生產(chǎn)上dump了一份數(shù)據(jù)庫文件下來,然后沒有產(chǎn)生對應(yīng)的帳號陈莽,解決方法
- 創(chuàng)建與xxx同名的帳戶平绩,密碼也相同
- 進(jìn)入mysql執(zhí)行以下指令 以windows為例
mysql -uroot -proot
mysql> grant all privileges on *.* to xxx@"%" identified by "yourpassword";
mysql> flush privileges;
然后用xxx帳戶進(jìn)入mysql粗井,就會發(fā)現(xiàn)這些存儲過程可以執(zhí)行了