简体   繁体   English

ER_NOT_SUPPORTED_AUTH_MODE:客户端不支持服务器请求的认证协议; 考虑升级 MySQL 客户端

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

Problem in mysql used in nodejs nodejs中使用的mysql中的问题

const mysql      = require('mysql');
var connection = mysql.createConnection({
  host     : 'localhost',
  user     : 'root',
  password : '123456789',
  database : 'userdata'
});

connection.connect(function(err) {
  if (err) {
    console.error('error connecting: ' + err);
    return;
  }

 console.log('connected as id ' + connection.threadId);
});

Error : ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server;错误ER_NOT_SUPPORTED_AUTH_MODE:客户端不支持服务器请求的认证协议; consider upgrading MySQL client考虑升级 MySQL 客户端

Had the same problem.有同样的问题。

Install MySQL Workbench安装MySQL 工作台

Execute this query: ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '123456789';执行此查询: ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '123456789'; in MySQL Workbench在 MySQL 工作台中

Head back over to Node.js and try running the file again.返回到 Node.js 并尝试再次运行该文件。 It should work, at least it did for me.它应该有用,至少对我有用。

Best Solution try this it will resolve:最佳解决方案试试这个它会解决:

You installed mysql server using "mysql installer"您使用“mysql安装程序”安装了mysql服务器

1)open -> "mysql intsaller"

2)press reconfig mysql server

3)select left side "authentication method tab"

4)select radio button -->use legacy authentication method

5)now stop and restart the db 

Thanks!谢谢!

in any database software mysql workbench,datagrip, dbeaver...在任何数据库软件 mysql workbench、datagrip、dbeaver 中...

1st run this query:第一次运行此查询:
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password'; ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';

=---->if still your problem persist =---->如果您的问题仍然存在

2nd run this query:第二次运行这个查询:
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'password'; ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'password';

combine and run this 2 queries seperated worked for me with dockorize mysql结合并运行这 2 个单独的查询,使用 Dockorize mysql 为我工作

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 MySQL 错误:ER_NOT_SUPPORTED_AUTH_MODE:客户端不支持服务器请求的身份验证协议; 考虑升级 MySQL 客户端 - MySQL error: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client ER_NOT_SUPPORTED_AUTH_MODE:客户端不支持服务器请求的认证协议; 考虑在 Visual Studio 代码上升级 MySQL 客户端 - ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client on visual studio code 错误:ER_NOT_SUPPORTED_AUTH_MODE:客户端不支持服务器请求的身份验证协议; 考虑升级 MySQL 客户端 - Error: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client 错误连接到数据库:错误:ER_NOT_SUPPORTED_AUTH_MODE:客户端不支持服务器请求的身份验证协议 - Error Connecting to the database: Error: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server Node JS和mysql连接不上(客户端不支持服务器请求的认证协议考虑升级mysql客户端) - Node JS and mysql not connecting (client does not support authentication protocol requested by server consider upgrading mysql client) 运行问题 MySQL >8.0 sqlMessage:“ '客户端不支持服务器请求的认证协议; 考虑升级 MySQL 客户端',” - Problem running MySQL >8.0 sqlMessage:“ 'Client does not support authentication protocol requested by server; consider upgrading MySQL client',” MySQL 8.0 - 客户端不支持服务器请求的认证协议; 考虑升级 MySQL 客户端 - MySQL 8.0 - Client does not support authentication protocol requested by server; consider upgrading MySQL client 客户端不支持服务器请求的身份验证协议; 考虑升级MySQL客户端 - Client does not support authentication protocol requested by server; consider upgrading MySQL client 错误:客户端不支持服务器请求的认证协议; 考虑升级 MySQL 客户端 - Error: Client does not support authentication protocol requested by server; consider upgrading MySQL client 客户端不支持服务器请求的身份验证协议,请考虑升级mysql客户端 - client does not support authentication protocol requested by server consider upgrading mysql client
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM