客户端不支持服务器请求的认证协议;考虑升级MySQL客户端Client does not support authentication protocol req

733 阅读1分钟

nodejs直接访问数据库时,报

Client does not support authentication protocol requested by server; consider upgrading MySQL client

这时候只需要在mysql的workbench 输入一下命令行,执行就可以了

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '你的密码'; 
SELECT plugin FROM mysql.user WHERE User = 'root';