Search
 
SCRIPT & CODE EXAMPLE
 

SQL

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

Execute the following query in MYSQL Workbench

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;

Try connecting using node after you do so.

If that doesn't work, try it without @'localhost' part.
Comment

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

npm install mysql2
Comment

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

A possible workaround is to alter the type of user account to use the old authentication plugin:

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

Or create a different one that uses that same plugin:

CREATE USER 'foo'@'localhost' IDENTIFIED WITH mysql_native_password BY 'bar';
Comment

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

import mysql from "mysql2";
Comment

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

const mysql = require("mysql2")
Comment

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

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password ...
Comment

PREVIOUS NEXT
Code Example
Sql :: oracle add column with default value 
Sql :: mysql change primary key 
Sql :: get week day name sql server 
Sql :: mysql sysdate - 1 day 
Sql :: how to check current user in mysql 
Sql :: backup ms sql database table data to file 
Sql :: show all public tables sql 
Sql :: date 3 months from today sql 
Sql :: update row in mysql 
Sql :: oracle asynchronous procedure 
Sql :: script to add datafile to tablespace 
Sql :: select all field names for a table mysql 
Sql :: sql auto timestamp 
Sql :: sql server format datetime 
Sql :: mysql create timestamp column 
Sql :: mysql incrementation 
Sql :: psql show columns of table 
Sql :: sql display number without decimals 
Sql :: get row affected mysql 
Sql :: mysql order by desc null last 
Sql :: postgres database sizes 
Sql :: drop foreign key mysql 
Sql :: Suse Linux restart MySQL 
Sql :: get only structure database mysql 
Sql :: get date ISO in psql 
Sql :: random name function in mysql for nvarchar 
Sql :: mysql docker image for macbook m1 
Sql :: oracle sql listagg 
Sql :: Alter table add column in SQL Server- NAYCode.com 
Sql :: count characters of string mysql 
ADD CONTENT
Topic
Content
Source link
Name
2+5 =