時(shí)間:2024-03-09 11:51作者:下載吧人氣:33
引言
用SQLyog連接MySQL8.0(社區(qū)版:mysql-installer-community-8.0.15.0.msi),出現(xiàn)錯(cuò)誤2058(Plugin caching_sha2_password could not be loaded:xxxx),通過查詢資料了解了該錯(cuò)誤的原因并在本文中提出了該問題的方案。
原因
該錯(cuò)誤提示如下圖所示:
具體原因:新的MySQL 8.0安裝,在初始化數(shù)據(jù)目錄時(shí),將 ‘root’@’localhost’創(chuàng)建帳戶,并且該帳戶caching_sha2_password默認(rèn)使用,密碼的加密方法發(fā)生了改變,因此SQLyog不能正常解析,才報(bào)出如上錯(cuò)誤。
解決方案
以管理員運(yùn)行【開始】-【所有程序】-【MySQL】-【MySQL Server 8.0】-【MySQL 8.0 Command Line Client – Unicode】,如下圖所示:
鍵入root賬號(hào)的密碼如下所示.
按照以下sql格式輸入命令,其中password是指root賬號(hào)的密碼。
ALTER USER ‘root’@’localhost’ IDENTIFIED WITH mysql_native_password BY ‘password’;
網(wǎng)友評(píng)論