mysql報錯
Unhandled rejection Error: Error: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested b
y server; consider upgrading MySQL client
解決辦法
修改加密規(guī)則為普通模式,默認是嚴格加密模式
- 進入mysql控制面板,輸入
mysql -uroot -p,輸入密碼 - 在控制面板上依次輸入
- 修改加密規(guī)則
ALTER USER 'root'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER;- 更新用戶密碼
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';- 刷新權(quán)限
FLUSH PRIVILEGES; - 輸入剛剛修改的密碼,再次測試連接即可。
參考:mysql8.0版本 報錯:Error: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol...