Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client does not support authentication protocol requested by server; consider upgrading MySQL client | NodeJs | MySQL Client v 2.12.0 #1574

Closed
kaleemullah360 opened this issue Nov 15, 2016 · 3 comments

Comments

@kaleemullah360
Copy link

Error: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client
    at Handshake.Sequence._packetToError (/home/su/nodev/e-MCH-APp/node_modules/mysql/lib/protocol/sequences/Sequence.js:52:14)
    at Handshake.ErrorPacket (/home/su/nodev/e-MCH-APp/node_modules/mysql/lib/protocol/sequences/Handshake.js:103:18)
    at Protocol._parsePacket (/home/su/nodev/e-MCH-APp/node_modules/mysql/lib/protocol/Protocol.js:280:23)
    at Parser.write (/home/su/nodev/e-MCH-APp/node_modules/mysql/lib/protocol/Parser.js:74:12)
    at Protocol.write (/home/su/nodev/e-MCH-APp/node_modules/mysql/lib/protocol/Protocol.js:39:16)
    at Socket.<anonymous> (/home/su/nodev/e-MCH-APp/node_modules/mysql/lib/Connection.js:109:28)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at readableAddChunk (_stream_readable.js:176:18)
    at Socket.Readable.push (_stream_readable.js:134:10)
    --------------------
    at Protocol._enqueue (/home/su/nodev/e-MCH-APp/node_modules/mysql/lib/protocol/Protocol.js:141:48)
    at Protocol.handshake (/home/su/nodev/e-MCH-APp/node_modules/mysql/lib/protocol/Protocol.js:52:41)
    at Connection.connect (/home/su/nodev/e-MCH-APp/node_modules/mysql/lib/Connection.js:136:18)
    at Object.<anonymous> (/home/su/nodev/e-MCH-APp/config/dbcon.js:14:12)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)

@sidorares
Copy link
Member

likely you have user configured with mysql_old_auth

2 options:

  1. convert to new auth protocol: http://dev.mysql.com/doc/refman/5.7/en/old-client.html or
  2. allow to use insecure auth: https://github.com/mysqljs/mysql#connection-options insecureAuth option

@kaleemullah360
Copy link
Author

Thanks, 2) allow to use insecure auth, helped. but not option 1.
👍 👍

@ilatypov
Copy link

A StackOverflow answer suggested to use the old password hash algorithm, and the following statement worked, enabling a NodeJS Sequelize client authenticate.

alter user 'USER'@'localhost' identified with mysql_native_password by 'PASSWORD'

@mysqljs mysqljs locked as resolved and limited conversation to collaborators May 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

3 participants