[Solved] Node Connect MYSQL Error: Client does not support authentication protocol requested by server; consider upgrading MySQL client

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

Database connection failed,

Execute in MySQL window

 ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '密码';

The code then:

flush privileges;

Reload permission table operation. Run the JS file again to successfully connect to the MySQL database.

Similar Posts: