1
resposta

não consigo conectar o bd ao nodejs.

já tentei todas as soluções aqui do tópico e as que eu achei na internet

rror: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client at Handshake.Sequence.packetToError (C:\Users\Ciça\Desktop\moveon\backend\nodemodules\mysql\lib\protocol\sequences\Sequence.js:47:14) at Handshake.ErrorPacket (C:\Users\Ciça\Desktop\moveon\backend\node_modules\mysql\lib\protocol\sequences\Handshake.js:123:18) at Protocol.parsePacket (C:\Users\Ciça\Desktop\moveon\backend\nodemodules\mysql\lib\protocol\Protocol.js:291:23) at Parser.parsePacket (C:\Users\Ciça\Desktop\moveon\backend\nodemodules\mysql\lib\protocol\Parser.js:433:10) at Parser.write (C:\Users\Ciça\Desktop\moveon\backend\node_modules\mysql\lib\protocol\Parser.js:43:10) at Protocol.write (C:\Users\Ciça\Desktop\moveon\backend\node_modules\mysql\lib\protocol\Protocol.js:38:16) at Socket. (C:\Users\Ciça\Desktop\moveon\backend\node_modules\mysql\lib\Connection.js:88:28) at Socket. (C:\Users\Ciça\Desktop\moveon\backend\node_modules\mysql\lib\Connection.js:526:10) at Socket.emit (events.js:321:20)

at addChunk (_stream_readable.js:297:12)
--------------------
at Protocol._enqueue (C:\Users\Ciça\Desktop\moveon\backend\node_modules\mysql\lib\protocol\Protocol.js:144:48)
at Protocol.handshake (C:\Users\Ciça\Desktop\moveon\backend\node_modules\mysql\lib\protocol\Protocol.js:51:23)
at Connection.connect (C:\Users\Ciça\Desktop\moveon\backend\node_modules\mysql\lib\Connection.js:116:18)
at Object.<anonymous> (C:\Users\Ciça\Desktop\moveon\backend\index.js:4:9)
at Module._compile (internal/modules/cjs/loader.js:1151:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1171:10)
at Module.load (internal/modules/cjs/loader.js:1000:32)
at Function.Module._load (internal/modules/cjs/loader.js:899: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 }

1 resposta

Boa tarde, Maria. Tudo bem?

Achei aqui no próprio fórum esse mesmo problema solucionado, provavelmente você terá de resetar a senha do banco, vou deixar o link. Espero que ajude :)

https://cursos.alura.com.br/forum/topico-erro-er_not_supported_auth_mode-client-does-not-support-authentication-protocol-requested-by-server-consider-upgrading-mysql-client-61991