1. 程式人生 > >Mysql8.0.13出現的2059 - authentication plugin 'caching_sha2_password'-Navicat連線異常問題解決

Mysql8.0.13出現的2059 - authentication plugin 'caching_sha2_password'-Navicat連線異常問題解決

前言

今天在使用docker的mysql映象製作了一個mysql容器,準備用Navicat連線,發現報錯。

2059 - authentication plugin 'caching_sha2_password'

原來使用docker映象的mysql版本是8.0.13。
在這裡插入圖片描述
資料庫查詢user表,發現新版使用的,caching_sha2_password ,可能我自己的navicat版本不支援這種格式的密碼。

plugin authentication_string
caching_sha2_password $A 005 005 piM&Krp\j/35!8<;HxBixcPjO34yvUXvNgQIPbdNu.E9xREeQDU9UZ1tAN/

解決辦法

在進到docker容器中的mysql裡修改。

ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '123456';
FLUSH PRIVILEGES;

在次用Navicat登入連線成功了。