Docker in question after installation mysql8 not remotely connected caching-sha2-password

# Modify the encryption rule 
ALTER USER 'root'@'%' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER; 
# Update about the user's password 
The USER the ALTER 'root' @ '%' IDENTIFIED the WITH mysql_native_password BY 'password'; 

# refresh permission

FLUSH PRIVILEGES;

# reset the password

alter user 'root' @ '% ' identified by '123qwe'

NOTE: The above% is set up a remote connection to the local connection to localhost

Guess you like

Origin www.cnblogs.com/notchangeworld/p/12208538.html