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

question:

When connecting to mysql started by Docker, ERROR 2059 (HY000): Authentication plugin 'caching_sha2_password' cannot be loaded

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

solution:

1. Enter the mysql container

docker exec -it mysql2 /bin/bash

2. Enter mysql

mysql -uroot -pmima

3. Change the password

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

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324974464&siteId=291194637