码迷,mamicode.com
首页 > 数据库 > 详细

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

时间:2020-01-26 15:52:26      阅读:77      评论:0      收藏:0      [点我收藏+]

标签:code   host   cti   after   requested   HERE   style   fresh   出现   

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 upgrading MySQL client

标签:code   host   cti   after   requested   HERE   style   fresh   出现   

原文地址:https://www.cnblogs.com/wuenze/p/12234261.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!