Skip to content Skip to sidebar Skip to footer

Node.js & MySQL - Error: 1251 - Client Does Not Support Authentication Protocol Requested By Server; Consider Upgrading MySQL Client

Right now I have only this code: const Sequelize = require('sequelize'); const sequelize = new Sequelize('database', 'root', 'passwd', { host: 'localhost', dialect: 'mysql',

Solution 1:

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

Worked for me. root password is changed to 'password'


Solution 2:

Changing the plugin to mysql_native_password might solve the problem!

use mysql;
update user set authentication_string=password(''), plugin='mysql_native_password' where user='root';

Solution 3:

Basically when I was trying to connect to Mysql Query Browser at that time I as facing the issue.

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

Worked for me. root password is changed to 'root'


Solution 4:

I found out that I was caused by incorrect parameters.

{ database: 'abc',
  username: undefined,
  password: 'efsefs',
}

username is undefined, but the error is "consider upgrading MySQL client" So modify the user name to be true, the error resolved.


Post a Comment for "Node.js & MySQL - Error: 1251 - Client Does Not Support Authentication Protocol Requested By Server; Consider Upgrading MySQL Client"