須要從新配置加密規則mysql
ALTER USER 'root'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER; ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password'; #更新一下用戶的密碼 ALTER USER "root"@"localhost" IDENTIFIED BY "你的新密碼"; #這樣修改密碼也行 FLUSH PRIVILEGES; #刷新權限