对于 Client does not support authentication protocol requested by server; consider upgrading MySQL client
报错,原因是因为新版的 mysql 用户密码的加密方式 Node.js 已经无法解析,我们只需要将 mysql 的密码改成旧版 Node.js 能够解析的就可以了:
然后输入
1 | mysql> alter user 'root'@'localhost' identified with mysql_native_password by '新密码'; |
即可。