MySql 這個垃圾,從8.0開始修改密碼有了變化,在user表加了字段authentication_string,修改密碼前先檢查authentication_string是否爲空mysql
一、若是不爲空sql
use mysql; ide
update user set authentication_string='' where user='root';--將字段置爲空.net
ALTER user 'root'@'localhost' IDENTIFIED BY 'root';--修改密碼爲root插件
二、若是爲空,直接修改命令行
ALTER user 'root'@'localhost' IDENTIFIED BY 'root';--修改密碼爲rootserver
還有種SB狀況,navicate for mysql 會提示版本須要更新,例如這樣blog
Client does not support authentication protocol requested by serverstring
緣由:it
在MySQL 8.04前,執行:SET PASSWORD=PASSWORD('[新密碼]');可是MySQL8.0.4開始,這樣默認是不行的。由於以前,MySQL的密碼認證插件是「mysql_native_password」,而如今使用的是「caching_sha2_password」。
處理方法:
進入命令行界面
use mysql;
alter user 'root'@'localhost'identified with mysql_native_password by 'root';
flush privileges;
問題解決 ———————————————— 版權聲明:本文爲CSDN博主「Mr.Lpp」的原創文章,遵循CC 4.0 by-sa版權協議,轉載請附上原文出處連接及本聲明。原文連接:https://blog.csdn.net/u012232730/article/details/82417245