Client does not support authentication protocol requested by server; conside

在node连接mysql时发生这样的错误,可以执行一下命令

在终端先进入mysql,然后执行以下命令

命令如下:

1、use mysql;
2、alter user ‘root’@‘localhost’ identified with mysql_native_password by ‘数据库密码’;
3、flush privileges;

猜你喜欢

转载自blog.csdn.net/joyvonlee/article/details/104873916