Tag Archives: ER_NOT_SUPPORTED_AUTH_MODE node

[Solved] ER_NOT_SUPPORTED_AUTH_Mode node connection database error

Error content

  code: 'ER_NOT_SUPPORTED_AUTH_MODE',
  errno: 1251,
  sqlMessage: 'Client does not support authentication protocol requested by server; consider upgrading MySQL client',
  sqlState: '08004',
  fatal: true

No problem with the database connection configuration

	"db_config" : {
		"protocol" : "mysql",
		"host" : "127.0.0.1",
		"database" : "mysql",
		"user" : "root",
		"password" : "123",
		"port" : 3306
	}

terms of settlement

Enter the CMD command prompt page to log in to MySQL

MySQL -u root -p

Input password

Execute these two sentences:

alter USER 'root'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRENEVER;
alter USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '修改自己的密码';

It should be OK to execute it again at this time

Cause of problem

Through BD, the reason for error reporting is finally found:

It is said that mysql8.0 encryption is not supported by node

Some people said that this was an error mentioned when you installed SQL server. You selected “strong authentication”, but you set a weak password. You need to reset the strong password or select the old authentication method