NodeJS MySQL Client does not support authentication protocol

白昼怎懂夜的黑 提交于 2020-04-08 09:59:47

问题


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

回答1:


Try change the password as below:

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


来源:https://stackoverflow.com/questions/51008807/nodejs-mysql-client-does-not-support-authentication-protocol

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!