解决MySQL8.0报错Client does not support authentication protocol requested by server...问题
解决MySQL8.0报错Client does not support authentication protocol requested by server; consider upgrading MySQL client问题原创2023-10-07报错内容使用node.js连接数据库MySQL 8时候报错ER_NOT_SUPPORTED_AUTH_MODE并且提示Client does not support authentication protocol requested by server; consider upgrading MySQL client客户端不支持服务器请求的身份验证协议考虑升级MySQL客户端报错原因最新的MySQL模块并未完全支持MySQL 8.0的caching_sha2_password加密方式而MySQL 8.0中默认仍然是caching_sha2_password加密方式因此用户认证不通过了。如下查询mysql alter user rootlocalhost identified by 123456; Query OK, 0 rows affected (0.02 sec)这里的“123456”是你自己的密码解决方法直接数据库工具里面修改加密方式mysql_native_password或者通过指令方式修改mysql alter user rootlocalhost identified with mysql_native_password by 123456; Query OK, 0 rows affected (0.01 sec)数据库连接和关闭都成功连接问题解决