By local to connect the remote MySQL times wrong, the reason when mysql8.0 encryption method changed.
mysql8.0 by default with the Caching_sha2_password encryption method
This type of encryption is not supported by third-party clients, and only the command-line support that comes with it
So you need to change the encryption method.
First go to MySQL command line
[Email protected] ~]# mysql-u root-p
Enter Password:
First step: Change the encryption method
ALTER USER ' root ' @ ' localhost ' identified by ' [email protected] ' PASSWORD EXPIRE never;
Step Two: re-modify the password
ALTER USER ' root ' @ '% ' identified with Mysql_native_password by ' [email protected] ';
Step three: refresh (do not do so may not be effective)
FLUSH privileges;
You can then connect successfully.
Remote connection Mysql8.0,error no.2058 Plugin Caching_sha2_password could not being loaded