收集mysql使用过程中出现的一些问题

  1. 使用eggjs + mysql的项目中,启动项目提示:ERROR 7512 nodejs.ER_NOT_SUPPORTED_AUTH_MODEError: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client

mysql使用问题收集

导致这个错误的原因是,目前,最新的mysql模块并未完全支持MySQL 8的“caching_sha2_password”加密方式,而“caching_sha2_password”在MySQL 8中是默认的加密方式。因此,下面的方式命令是默认已经使用了“caching_sha2_password”加密方式,该账号、密码无法在mysql模块中使用。

解决办法:使用mysql shell登录,执行语句:ALTER USER 'root'@'localhost' IDENTIFIED BY 'password';

来源:https://waylau.com/node.js-mysql-client-does-not-support-authentication-protocol/

相关文章:

  • 2021-04-23
  • 2021-12-15
  • 2021-11-24
  • 2022-01-17
  • 2022-02-09
  • 2021-12-03
  • 2022-02-21
  • 2021-08-30
猜你喜欢
  • 2021-07-04
  • 2021-11-14
  • 2022-01-28
  • 2021-12-07
  • 2021-11-29
  • 2022-01-11
  • 2022-02-14
相关资源
相似解决方案