Tag Archives: Connection error

[Solved] Navicat Connect MySQL error: Authentication plugin ‘caching_sha2_password‘ cannot be loaded

The reason for this problem is: the different encryption rules before and after MySQL8 cause the problem, now let’s deal with it.

Windows system operation steps, Linux can refer to

Run CMD with administrator command

mysql -u root -p

If the command fails, the environment variable is not configured. After configuring the environment variable, execute it, or go to the bin folder of MySQL installation directory to execute the above statement.

Modify encryption rules

ALTER USER 'root'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER;

update user password

 ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';

refresh permission

 FLUSH PRIVILEGES;

reset password

ALTER USER 'root'@'localhost' IDENTIFIED BY 'NEW_PASSWORD';

After the modification is completed, go to Navicat to test the connection, and you can succeed.