<親測>用navicat鏈接mysql 8.0 報錯2059

ERROR 2059 (HY000): Authentication plugin 'caching_sha2_password' cannot be loaded

版權聲明:本文爲博主原創文章,未經博主容許不得轉載。 https://blog.csdn.net/HeatDeath/article/details/80226934

問題:html

鏈接Docker啓動的mysql出現:ERROR 2059 (HY000): Authentication plugin 
‘caching_sha2_password’ cannot be loadedmysql

C:\mysqldata>mysql -h 127.0.0.1 -P 13306 -uroot -p Enter password: 
** ERROR 2059 (HY000): Authentication plugin ‘caching_sha2_password’ cannot be loaded: ÕÒ²»µ½Ö¸¶¨µÄÄ£¿é¡£sql

解決方案:docker

1.進入mysql容器windows

docker exec -it mysql2 /bin/bash
  • 1

2.進入mysqlbash

mysql -uroot -pmima
  • 1

3.修改密碼markdown

ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'root';
  • 1

多是 MySQL 版本太新形成的》。。post

參考資料:spa

一、ERROR 2059 (HY000): Authentication plugin ‘caching_sha2_password’ cannot be loaded 
http://www.javashuo.com/article/p-ehdvyjwu-my.html.net

二、2059 - authentication plugin ‘caching_sha2_password’ -navicat鏈接異常問題解決 
https://blog.csdn.net/m0_38017782/article/details/80061991

 



 

實際上在windows server 2008 r2上 按照如上方法 安裝 mysql 8.0時 密碼依然不對,因此又加了兩行

SET PASSWORD FOR 'root'@'localhost' = 'password';

flush privileges;

相關文章
相關標籤/搜索