Access denied for user 'root'@'xxx' (using password: YES)
這表示MySQL服務(wù)端拒絕來自xxx主機(jī)的root用戶登錄,盡管我檢查了一下,root的用戶名和密碼都沒錯(cuò),還是拒絕。
解決方案:
select user,host from mysql.user;
執(zhí)行發(fā)現(xiàn),root用戶的hsot值為localhost,只能來自localhost的主機(jī)登錄,那就將root 的hsot值修改為%,表示運(yùn)行來自任何主機(jī)的連接。文章來源:http://www.zghlxwxcb.cn/news/detail-726465.html
UPDATE mysql.`user` set `Host` = '%' WHERE `User` = 'root';
改完就可以連接了。文章來源地址http://www.zghlxwxcb.cn/news/detail-726465.html
到了這里,關(guān)于Access denied for user ‘root‘@‘xxx‘ (using password: YES)的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!