通過ip連接MySQL時(shí)出現(xiàn)1449、1045異常
2017-10-20 13:43:02
12611
通過ip連接MySQL時(shí)出現(xiàn)1449、1045異常
mysql 1449 : The user specified as a definer ('root'@'%') does not exist 解決方法
把sql導(dǎo)到本地,執(zhí)行存儲(chǔ)過程 或者 查看視頻報(bào)錯(cuò):
mysql 1449 : The user specified as a definer ('root'@'%') does not exist 解決方法
權(quán)限問題,授權(quán) 給 root 所有sql 權(quán)限
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
連接時(shí)出現(xiàn)1045異常:
如果是mysql 5.6以前的,輸入U(xiǎn)PDATE mysql.user SET Password=PASSWORD('123456') WHERE User='root';
如果是mysql 5.6以后的,輸入U(xiǎn)PDATE mysql.user SET authentication_string=PASSWORD('root') WHERE USER='root';
這是由于5.6以后user表中沒有password字段。
輸入FLUSH PRIVILEGES; 刷新數(shù)據(jù)庫。