Error: Authentication is failed when connect mysql with Nodejs

Error: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client

Solution:

You’re exactly correct here, we currently don’t support the caching_sha2_password authentication method for MySQL, but it is in our queue to add support for.

For any future users, you can update the authentication method using:

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password'

Where root as your user localhost as your URL and password as your password

Then run this query to refresh privileges:

flush privileges;

你可能感兴趣的:(Error: Authentication is failed when connect mysql with Nodejs)