关于MySQL "1251-client does not support authentication..."的处理办法

关于MySQL "1251-client does not support authentication..."的处理办法

 

主要原因是在mysql8之前的版本中加密规则为mysql_native_password


而在mysql8以后的加密规则为caching_sha2_password。

ALTER USER 'root'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER; #修改加密规则  
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '新密码';  #更新一下用户的密码  
FLUSH PRIVILEGES; #刷新权限

你可能感兴趣的:(关于MySQL "1251-client does not support authentication..."的处理办法)