连接MySQL时出现1449与1045异常解决办法
?
1 | mysql 1449 : The user specified as a definer ( 'root' @ '%' ) does not exist 解决方法 |
把sql导到本地,执行存储过程 或者 查看视频报错:
?
1 | mysql 1449 : The user specified as a definer ( 'root' @ '%' ) does not exist 解决方法 |
权限问题,授权 给 root 所有sql 权限
?
12345678910 | 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; 刷新数据库。
如有疑问请留言或者到本站社区交流讨论,感谢阅读,希望能帮助到大家,谢谢大家对本站的支持!
點(diǎn)擊查看更多內(nèi)容
為 TA 點(diǎn)贊
評(píng)論
評(píng)論
共同學(xué)習(xí),寫下你的評(píng)論
評(píng)論加載中...
作者其他優(yōu)質(zhì)文章
正在加載中
感謝您的支持,我會(huì)繼續(xù)努力的~
掃碼打賞,你說多少就多少
贊賞金額會(huì)直接到老師賬戶
支付方式
打開微信掃一掃,即可進(jìn)行掃碼打賞哦