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

How did “people you might know” find you on social software>>>

This problem occurs when linking MySQL of virtual machine docker locally. The main problem is that our version of MySQL is relatively high, and the password verification method has been changed

Question:

When connecting to MySQL started by docker, error 2059 (HY000): authentication plugin ‘caching appears_ 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: ÕÒ ² »µ ½ Ö¸¶¨µÄÄ£¿é¡£

The solution is simple

Solution:

1. Enter the MySQL container

docker exec -it mysql01 /bin/bash

This is the MySQL environment in my docker. Mysql2 above is the name of MySQL in my docker, which can be viewed with dockers. My name is mysql01

2. Enter MySQL

MySQL – uroot – pxxx, where XXX is the password set during installation

3. Change the password

ALTER USER ‘root’@’%’ IDENTIFIED WITH mysql_ native_ password BY ‘root’;

Then you can

Similar Posts: