Bug #100472 node_modules\mysql\lib\protocol\Parser.js:437
Submitted: 9 Aug 2020 15:34 Modified: 13 Aug 2020 6:28
Reporter: Kobie Watkins Email Updates:
Status: Not a Bug Impact on me:
None 
Category:Connector for Node.js Severity:S3 (Non-critical)
Version:8.0.21 OS:Windows (Microsoft Windows 10 Home)
Assigned to: CPU Architecture:Any
Tags: WBBugReporter

[9 Aug 2020 15:34] Kobie Watkins
Description:
----[For better reports, please attach the log file after submitting. You can find it in C:\Users\kobie\AppData\Roaming\MySQL\Workbench\log\wb.log]

C:\Users\kobie\codingbootcamp\Employee-Trails\node_modules\mysql\lib\protocol\Parser.js:437
      throw err; // Rethrow non-MySQL errors
      ^

Error: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client
    at Handshake.Sequence._packetToError (C:\Users\kobie\codingbootcamp\Employee-Trails\node_modules\?[4mmysql?[24m\lib\protocol\sequences\Sequence.js:47:14)
    at Handshake.ErrorPacket (C:\Users\kobie\codingbootcamp\Employee-Trails\node_modules\?[4mmysql?[24m\lib\protocol\sequences\Handshake.js:123:18)
    at Protocol._parsePacket (C:\Users\kobie\codingbootcamp\Employee-Trails\node_modules\?[4mmysql?[24m\lib\protocol\Protocol.js:291:23)
    at Parser._parsePacket (C:\Users\kobie\codingbootcamp\Employee-Trails\node_modules\?[4mmysql?[24m\lib\protocol\Parser.js:433:10)
    at Parser.write (C:\Users\kobie\codingbootcamp\Employee-Trails\node_modules\?[4mmysql?[24m\lib\protocol\Parser.js:43:10)
    at Protocol.write (C:\Users\kobie\codingbootcamp\Employee-Trails\node_modules\?[4mmysql?[24m\lib\protocol\Protocol.js:38:16)
    at Socket.<anonymous> (C:\Users\kobie\codingbootcamp\Employee-Trails\node_modules\?[4mmysql?[24m\lib\Connection.js:88:28)
$                                                                                                                                                                                               at addChunk (_stream_readable.js:295:12)?[39m
    --------------------
    at Protocol._enqueue (C:\Users\kobie\codingbootcamp\Employee-Trails\node_modules\?[4mmysql?[24m\lib\protocol\Protocol.js:144:48)
    at Protocol.handshake (C:\Users\kobie\codingbootcamp\Employee-Trails\node_modules\?[4mmysql?[24m\lib\protocol\Protocol.js:51:23)
    at Connection.connect (C:\Users\kobie\codingbootcamp\Employee-Trails\node_modules\?[4mmysql?[24m\lib\Connection.js:116:18)
    at start (C:\Users\kobie\codingbootcamp\Employee-Trails\index.js:15:14)
    at Object.<anonymous> (C:\Users\kobie\codingbootcamp\Employee-Trails\index.js:39:1)
?[90m    at Module._compile (internal/modules/cjs/loader.js:1138:30)?[39m
?[90m    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)?[39m
?[90m    at Module.load (internal/modules/cjs/loader.js:986:32)?[39m
?[90m    at Function.Module._load (internal/modules/cjs/loader.js:879:14)?[39m
?[90m    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)?[39m {
  code: ?[32m'ER_NOT_SUPPORTED_AUTH_MODE'?[39m,
  errno: ?[33m1251?[39m,
  sqlMessage: ?[32m'Client does not support authentication protocol requested by server; consider upgrading MySQL client'?[39m,
  sqlState: ?[32m'08004'?[39m,
  fatal: ?[33mtrue?[39m

How to repeat:
C:\Users\kobie\codingbootcamp\Employee-Trails\node_modules\mysql\lib\protocol\Parser.js:437
      throw err; // Rethrow non-MySQL errors
      ^

Error: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client
    at Handshake.Sequence._packetToError (C:\Users\kobie\codingbootcamp\Employee-Trails\node_modules\?[4mmysql?[24m\lib\protocol\sequences\Sequence.js:47:14)
    at Handshake.ErrorPacket (C:\Users\kobie\codingbootcamp\Employee-Trails\node_modules\?[4mmysql?[24m\lib\protocol\sequences\Handshake.js:123:18)
    at Protocol._parsePacket (C:\Users\kobie\codingbootcamp\Employee-Trails\node_modules\?[4mmysql?[24m\lib\protocol\Protocol.js:291:23)
    at Parser._parsePacket (C:\Users\kobie\codingbootcamp\Employee-Trails\node_modules\?[4mmysql?[24m\lib\protocol\Parser.js:433:10)
    at Parser.write (C:\Users\kobie\codingbootcamp\Employee-Trails\node_modules\?[4mmysql?[24m\lib\protocol\Parser.js:43:10)
    at Protocol.write (C:\Users\kobie\codingbootcamp\Employee-Trails\node_modules\?[4mmysql?[24m\lib\protocol\Protocol.js:38:16)
    at Socket.<anonymous> (C:\Users\kobie\codingbootcamp\Employee-Trails\node_modules\?[4mmysql?[24m\lib\Connection.js:88:28)
$                                                                                                                                                                                               at addChunk (_stream_readable.js:295:12)?[39m
    --------------------
    at Protocol._enqueue (C:\Users\kobie\codingbootcamp\Employee-Trails\node_modules\?[4mmysql?[24m\lib\protocol\Protocol.js:144:48)
    at Protocol.handshake (C:\Users\kobie\codingbootcamp\Employee-Trails\node_modules\?[4mmysql?[24m\lib\protocol\Protocol.js:51:23)
    at Connection.connect (C:\Users\kobie\codingbootcamp\Employee-Trails\node_modules\?[4mmysql?[24m\lib\Connection.js:116:18)
    at start (C:\Users\kobie\codingbootcamp\Employee-Trails\index.js:15:14)
    at Object.<anonymous> (C:\Users\kobie\codingbootcamp\Employee-Trails\index.js:39:1)
?[90m    at Module._compile (internal/modules/cjs/loader.js:1138:30)?[39m
?[90m    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)?[39m
?[90m    at Module.load (internal/modules/cjs/loader.js:986:32)?[39m
?[90m    at Function.Module._load (internal/modules/cjs/loader.js:879:14)?[39m
?[90m    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)?[39m {
  code: ?[32m'ER_NOT_SUPPORTED_AUTH_MODE'?[39m,
  errno: ?[33m1251?[39m,
  sqlMessage: ?[32m'Client does not support authentication protocol requested by server; consider upgrading MySQL client'?[39m,
  sqlState: ?[32m'08004'?[39m,
  fatal: ?[33mtrue?[39m
[13 Aug 2020 6:28] MySQL Verification Team
Hello Kobie Watkins,

Thank you for the report and feedback.
This doesn't look like a MySQL Server issue but MySQL Connector/Node.js one. Please note that MySQL 8.0 uses a new default authentication plugin i.e caching_sha2_password and Node.js drivers for MySQL don't support compatible client-side authentication mechanisms for the new server plugin. Possible workarounds are to alter the type of user account to use the old authentication plugin i.e ALTER USER '<user_name>'@'<host_name>' IDENTIFIED WITH mysql_native_password ... or use another option i.e to use the official MySQL Node.js connector https://www.npmjs.com/package/@mysql/xdevapi, which is based on the X Protocol and already supports the new authentication mode. Thank you.

regards,
Umesh