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

問題:mysql

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

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: ÕÒ²»µ½Ö¸¶¨µÄÄ£¿é¡£docker

解決方案:bash

1.進入mysql容器spa

docker exec -it mysql2 /bin/bashit

2.進入mysqlio

mysql -uroot -pmima容器

3.修改密碼plugin

ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'root';密碼

相關文章
相關標籤/搜索