在nodejs链接MySQL时,若出现Client does not support authentication protocol requested by server; consider upgrading MySQL client错误时,不妨试着下面操作
USE mysql;
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'xxxxxx';
FLUSH PRIVILEGES;
其中root:用户名;xxxxxx是你新设置密码