1. 程式人生 > >mysql出現The user specified as a definer ('root'@'%') does not exist報錯!

mysql出現The user specified as a definer ('root'@'%') does not exist報錯!

今天導了一次資料到mysql中,匯入之後表的資料都沒問題,但是檢視開啟就報了The user specified as a definer ('root'@'%') does not exist的錯。百度了一下,很快找到了相同的答案。

登陸mysql (用cmd進入到mysql安裝的bin目錄下), 輸入:mysql -u root -p 回車後再輸入密碼(或者使用Navicat for MySQL進入命令介面 ) 再執行: mysql >grant all privileges on *.* to [email protected]"%" identified by "Passwd"
mysql >flush privileges; ------------------------------------------------------- 萬惡的分號啊,之前沒有接觸過命令操作,就沒有加分號,導致半天都沒能成功。