十年網(wǎng)站開發(fā)經(jīng)驗(yàn) + 多家企業(yè)客戶 + 靠譜的建站團(tuán)隊(duì)
量身定制 + 運(yùn)營維護(hù)+專業(yè)推廣+無憂售后,網(wǎng)站問題一站解決
這篇文章將為大家詳細(xì)講解有關(guān)安裝新版本MySQL導(dǎo)致登錄phpMyAdmin報(bào)錯(cuò)怎么辦,小編覺得挺實(shí)用的,因此分享給大家做個(gè)參考,希望大家閱讀完這篇文章后可以有所收獲。

安裝新版本MySQL導(dǎo)致登錄phpMyAdmin報(bào)錯(cuò)
安裝了新版mysql以后用phpMyadmin登錄,遇到報(bào)錯(cuò)
第一種報(bào)錯(cuò):
mysqli::real_connect(): (HY000/2002): No such file or directory
解決辦法:
把/libraries/config.default.php 和/config.sample.inc.php文件中的
$cfg['Servers'][$i]['host'] = 'localhost'
改為
$cfg['Servers'][$i]['host'] = '127.0.0.1';
第二種報(bào)錯(cuò):
mysqli_real_connect(): The server requested authentication method unknown to the client [caching_sha2_password] mysqli_real_connect(): (HY000/2054): The server requested authentication method unknown to the client
解決辦法:
終端登陸mysql
mysql -u root -p
修改授權(quán)用戶
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password'
password為mysql登錄密碼
關(guān)于“安裝新版本MySQL導(dǎo)致登錄phpMyAdmin報(bào)錯(cuò)怎么辦”這篇文章就分享到這里了,希望以上內(nèi)容可以對大家有一定的幫助,使各位可以學(xué)到更多知識,如果覺得文章不錯(cuò),請把它分享出去讓更多的人看到。