解决node.js链接数据库时出现的报错 --- client does not support authentication

打开mysql数据库小黑屏

然后输入

mysql> alter user 'root'@'localhost' identified with mysql_native_password by '123456';  //‘123456’为新密码
Query OK, 0 rows affected (0.10 sec)

mysql> flush privileges;

Query OK, 0 rows affected (0.01 sec)

即可重新登录。

原文:https://blog.csdn.net/u012965373/article/details/81206241

posted @ 2019-05-29 10:45  遗失的王者之心  阅读(256)  评论(0编辑  收藏  举报