nodejs 连接 mysql 出现 Client does not support authentication protocol requested by server; consider upg

Posted 大财主

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了nodejs 连接 mysql 出现 Client does not support authentication protocol requested by server; consider upg相关的知识,希望对你有一定的参考价值。

ALTER USER ‘root‘@‘localhost‘ IDENTIFIED WITH mysql_native_password BY ‘password‘

Where root as your user localhost as your URL and password as your password

Then run this query to refresh privileges:

flush privileges;

Try connecting using node after you do so.

If that doesn‘t work, try it without @‘localhost‘ part.

以上是关于nodejs 连接 mysql 出现 Client does not support authentication protocol requested by server; consider upg的主要内容,如果未能解决你的问题,请参考以下文章

mac nodejs连接mysql报错:Client does not support authentication protocol requested by server; consider up

NodeJS MySQL Client 不支持认证协议

使用Nodejs的mysql模块连接MySql数据库出现以下错误

NodeJS与MySQL首次连接中出现的一些小问题

Navicat for MySQL 连接 Mysql 8.0.11 出现1251- Client does not support authentication protocol

使用navicat连接mysql8.0.12版本 出现client does not support。。。解决办法