連接MySQL時出現1449與1045異常解決辦法

分類:IT技術 時間:2017-09-25

連接mysql時出現1449與1045異常解決辦法

mysql 1449 : The user specified as a definer ('root'@'%') does not exist 解決方法

把sql導到本地,執行存儲過程 或者 查看視頻報錯:

mysql 1449 : The user specified as a definer ('root'@'%') does not exist 解決方法

權限問題,授權 給 root  所有sql 權限 

mysql> grant all privileges on *.* to root@"%" identified by ".";
 
SQLException: The user specified as a definer ('ebook'@'%') does not exist:解決辦法
grant all privileges on *.* to ebook@"%" identified by ".";
Query OK, 0 rows affected (0.00 sec)


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

 連接時出現1045異常: 

如果是mysql 5.6以前的,輸入update mysql.user SET Password=PASSWORD('123456') WHERE User='root';

如果是mysql 5.6以後的,輸入UPDATE mysql.user SET authentication_string=PASSWORD('root') WHERE USER='root';

這是由於5.6以後user表中沒有password字段。

輸入FLUSH PRIVILEGES; 刷新數據庫。

如有疑問請留言或者到本站社區交流討論,感謝閱讀,希望能幫助到大家,謝謝大家對本站的支持!


Tags: 039 時出 mysql quot root 解決

文章來源:


ads
ads

相關文章
ads

相關文章

ad