mysqlエラーエラーError:ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol reque...

848 ワード

mysqlエラー
Unhandled rejection Error: Error: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested b
y server; consider upgrading MySQL client


解決策
暗号化ルールの変更は通常モード、デフォルトは厳格な暗号化モード
  • mysqlコントロールパネルに入り、mysql -uroot -pを入力し、パスワード
  • を入力する.
  • コントロールパネルに順次入力
  • 暗号化規則
  • を修正する
    ALTER USER 'root'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER; 
    
  • 更新ユーザパスワード
  • ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
    
  • 更新権限
  • FLUSH PRIVILEGES;
    
  • 修正したパスワードを入力し、接続を再テストすればいいです.

  • 参考:mysql 8.0バージョンエラー:Error:ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol...