2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

NodeでMySQL8.0

Last updated at Posted at 2018-10-02

Knexを使っていたのですがMySQL8にバージョンを変更してみたところ以下のようなエラーが出るようになりました。

clientがmysql

Error: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client

clientがmysql2

Error: Client does not support authentication protocol requested by server; consider upgrading MySQL client

設定をcaching_sha2_passwordから今まで通りのmysql_native_passwordに変更を行えば良いのですが、どうせならデフォルトの設定で頑張りたい。

caching_sha2_passwordに対応されているKnexで使えるnodeのクライアントはまだなさそう。

PRが出ていたのでので試してみました。

npm install ruiquelhas/mysql#feature/caching-sha2-password

とりあえずエラーは出なくなり使うことができました。

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?