MySQL - 2059 -Authentication plugin 'caching_sha2_password' cannot be loaded

Reason: the previous version of MySQL8.0 encryption rules mysql_native_password. But MySQL8.0 after encryption rules caching_sha2_password.

Solution: Modify the encryption rules.

 

First landing database

     Win + R open a command prompt type cmd

    

    mysql -uroot -p landing database

     

   Entry

    The USER the ALTER  'root' @ 'localhost' IDENTIFIED BY  'password' PASSWORD EXPIRE NEVER;  # change encryption; password here for your mysql login password.

    

    Adhesive

    The USER the ALTER 'root' @ 'localhost' IDENTIFIED the WITH mysql_native_password BY 'password';   # update the user password; the new password for your mysql password here want to set.

     

    Finally refresh permission, enter

     PRIVILEGES FLUSH;   # refresh permission

 

    

 

 

Finally, test the connection

    Navicat

 

Guess you like

Origin www.cnblogs.com/cxstudypython/p/12123374.html