1. 程式人生 > >mysql8 :authentication plugin 'caching_sha2_password'報錯解決

mysql8 :authentication plugin 'caching_sha2_password'報錯解決

 解決辦法親測有效,辦法引自:https://blog.csdn.net/u010026255/article/details/80062153

// 修改加密規則
ALTER USER 'root'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER; 
// 更新一下使用者的密碼 
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
// 重新整理許可權 
FLUSH PRIVILEGES;
// 最後重置下密碼:
alter user 'root'@'localhost' identified by '123456';