Na aula três, estou tendo problemas com a parte de conectar o Node.Js com o MySQL. O erro que tenho ao iniciar o servidor é o seguinte:
[nodemon] 2.0.7
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): *.*
[nodemon] watching extensions: js,mjs,json
[nodemon] starting `node index.js`
consign v0.1.6 Initialized in C:\Users\gabmt\Documents\MeusProjetos\Cursos-Alura\Javascript\Node\Rest-API-I
+ .\controllers\atendimentos.js
servidor rodando na porta 3000
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\gabmt\Documents\MeusProjetos\Cursos-Alura\Javascript\Node\Rest-API-I\node_modules\mysql\lib\protocol\sequences\Sequence.js:47:14)
at Handshake.ErrorPacket (C:\Users\gabmt\Documents\MeusProjetos\Cursos-Alura\Javascript\Node\Rest-API-I\node_modules\mysql\lib\protocol\sequences\Handshake.js:123:18)
at Protocol._parsePacket (C:\Users\gabmt\Documents\MeusProjetos\Cursos-Alura\Javascript\Node\Rest-API-I\node_modules\mysql\lib\protocol\Protocol.js:291:23)
at Parser._parsePacket (C:\Users\gabmt\Documents\MeusProjetos\Cursos-Alura\Javascript\Node\Rest-API-I\node_modules\mysql\lib\protocol\Parser.js:433:10)
at Parser.write (C:\Users\gabmt\Documents\MeusProjetos\Cursos-Alura\Javascript\Node\Rest-API-I\node_modules\mysql\lib\protocol\Parser.js:43:10)
at Protocol.write (C:\Users\gabmt\Documents\MeusProjetos\Cursos-Alura\Javascript\Node\Rest-API-I\node_modules\mysql\lib\protocol\Protocol.js:38:16)
at Socket.<anonymous> (C:\Users\gabmt\Documents\MeusProjetos\Cursos-Alura\Javascript\Node\Rest-API-I\node_modules\mysql\lib\Connection.js:88:28)
at Socket.<anonymous> (C:\Users\gabmt\Documents\MeusProjetos\Cursos-Alura\Javascript\Node\Rest-API-I\node_modules\mysql\lib\Connection.js:526:10)
at Socket.emit (events.js:315:20)
at addChunk (_stream_readable.js:295:12)
--------------------
at Protocol._enqueue (C:\Users\gabmt\Documents\MeusProjetos\Cursos-Alura\Javascript\Node\Rest-API-I\node_modules\mysql\lib\protocol\Protocol.js:144:48)
at Protocol.handshake (C:\Users\gabmt\Documents\MeusProjetos\Cursos-Alura\Javascript\Node\Rest-API-I\node_modules\mysql\lib\protocol\Protocol.js:51:23)
at Connection.connect (C:\Users\gabmt\Documents\MeusProjetos\Cursos-Alura\Javascript\Node\Rest-API-I\node_modules\mysql\lib\Connection.js:116:18)
at Object.<anonymous> (C:\Users\gabmt\Documents\MeusProjetos\Cursos-Alura\Javascript\Node\Rest-API-I\index.js:4:9)
at Module._compile (internal/modules/cjs/loader.js:1137:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
at Module.load (internal/modules/cjs/loader.js:985:32)
at Function.Module._load (internal/modules/cjs/loader.js:878:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
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
}
Alguém pode me ajudar?