[Solved] Deploying Tomcat connection in Linux Navicat reports error 2059 – authentication plugin ‘caching_sha2_Password ‘cannot be loaded: + Xi input 9 g

This problem gives me a headache because navicat15.0.26 does not support the newly added encryption method of mysql8.0, caching_sha2_Password, so we need to modify the user’s encryption method. First log in to MySQL,

mysql -uroot -p

This is my configuration information

Mysql 8.0.27
Navicat 15.0.26
tomcat 9.0.54

View encryption method:

show variables like 'default_authentication_plugin';

Log in to the database using the command-line client tool provided with MySQL database, and enter use mysql

Query the original authentication plug-in of MySQL user from the database user table

select user,host,plugin,authentication_string from user;

Replace the authentication plug-in used by the user with MySQL used in the previous version_ native_ password

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

Just use Navicat to connect again.

Similar Posts: