NodeJS MySQL客户端不支持身份验证协议 [英] NodeJS MySQL Client does not support authentication protocol

查看:244
本文介绍了NodeJS MySQL客户端不支持身份验证协议的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试与mysql 8.0连接时,出现此错误.我怎样才能解决这个问题 ?

When I am trying to connect with mysql 8.0 I am getting this error. How can I fix this ?

code: 'ER_NOT_SUPPORTED_AUTH_MODE',
errno: 1251,
sqlMessage: 'Client does not support authentication protocol requested by server; 
consider upgrading MySQL client',
sqlState: '08004',
fatal: true

推荐答案

尝试如下更改密码:

ALTER USER 'root'@'localhost' IDENTIFIED BY 'your new password'; 
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'your new password';

这篇关于NodeJS MySQL客户端不支持身份验证协议的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆