mysql :The user specified ... does not exist 报错
2019獨(dú)角獸企業(yè)重金招聘Python工程師標(biāo)準(zhǔn)>>>
程序在調(diào)用到數(shù)據(jù)庫(kù)的視圖時(shí)報(bào)錯(cuò),直接在數(shù)據(jù)庫(kù)中打開(kāi)視圖時(shí)也報(bào)錯(cuò),類似:
mysql?1449 : The user specified as a definer ('montor'@'%') does not exist
經(jīng)查,是權(quán)限問(wèn)題,解決辦法:
運(yùn)行:grant all privileges on *.* to monitor@"%" identified by ".";
之后打開(kāi)視圖時(shí)便不會(huì)報(bào)錯(cuò),程序調(diào)用也不會(huì)報(bào)錯(cuò)。
權(quán)限問(wèn)題,授權(quán) 給 root ?所有sql 權(quán)限
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)
轉(zhuǎn)載于:https://my.oschina.net/u/2262481/blog/1838568
總結(jié)
以上是生活随笔為你收集整理的mysql :The user specified ... does not exist 报错的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 想转行做web前端工程师,必学这6大技能
- 下一篇: Redis 一些高级用法