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';