java.sql.SQLException: Unable to load authentication plugin 'caching_sha2_password'.

When the test data appears:

Online information say is the difference between mysql5.x version and version 8.x;

Version 5.7 is: default_authentication_plugin = mysql_native_password

8.x version is: default_authentication_plugin = caching_sha2_password

Some netizens said that the my.ini configuration can be changed to 5.7, but where is it my.ini. . . .

Installation directory: C: \ Program Files \ MySQL \ MySQL Server 8.0 is not found ini file;

And continue to look for. The result is hidden programdata folder. . Appears to run inside the importation% programdata% in win + r, folders came out;

 

Finally found, feel grateful ah. Ini immediately modify the configuration, the server again, or not found. . .

Continue to Google. . . Finally found. mysql driver has been updated adaptation of the password rules caching_sha2_password, upgrade to the latest version on it.

 

Instead of the corresponding database version:

<version>8.0.11</version>

 

Guess you like

Origin www.cnblogs.com/YuyuanNo1/p/12576469.html