1. 程式人生 > >【問題解決】連接mysql 8錯誤:authentication plugin 'caching_sha2_password

【問題解決】連接mysql 8錯誤:authentication plugin 'caching_sha2_password

div mys host lte oot clas 通過 local span

在剛安裝好mysql8,使用native連接的時候報錯

authentication plugin ‘caching_sha2_password‘...

首先確保服務已開啟,然後通過cmd命令進入mysql的localhost數據庫

mysql -hlocalhost -uroot -p123456

然後進入mysql數據庫

use mysql;

修改密碼

ALTER USER ‘root‘@‘localhost‘ IDENTIFIED WITH mysql_native_password BY ‘‘;
FLUSH PRIVILEGES;

重新連接數據庫

OK 解決

【問題解決】連接mysql 8錯誤:authentication plugin 'caching_sha2_password