Boa tarde, estou fazendo a trilha Nodejs e estou me encontrando com problemas para seguir a aula 3. Estou configurando o modulo de banco de dados e ao rodar o server ele está retornando a msg:
> projeto-nodejs-rest@1.0.0 start /home/me/Desktop/projetoNodeJs
> nodemon index.js
[nodemon] 2.0.13
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): *.*z
[nodemon] watching extensions: js,mjs,json
[nodemon] starting `node index.js`
consign v0.1.6 Initialized in /home/me/Desktop/projetoNodeJs
+ ./controllers/orders.js
server run in port 3000
Error: ER_ACCESS_DENIED_ERROR: Access denied for user 'root'@'localhost' (using password: YES)
at Handshake.Sequence._packetToError (/home/me/Desktop/projetoNodeJs/node_modules/mysql/lib/protocol/sequences/Sequence.js:47:14)
at Handshake.ErrorPacket (/home/me/Desktop/projetoNodeJs/node_modules/mysql/lib/protocol/sequences/Handshake.js:123:18)
at Protocol._parsePacket (/home/me/Desktop/projetoNodeJs/node_modules/mysql/lib/protocol/Protocol.js:291:23)
at Parser._parsePacket (/home/me/Desktop/projetoNodeJs/node_modules/mysql/lib/protocol/Parser.js:433:10)
at Parser.write (/home/me/Desktop/projetoNodeJs/node_modules/mysql/lib/protocol/Parser.js:43:10)
at Protocol.write (/home/me/Desktop/projetoNodeJs/node_modules/mysql/lib/protocol/Protocol.js:38:16)
at Socket.<anonymous> (/home/me/Desktop/projetoNodeJs/node_modules/mysql/lib/Connection.js:88:28)
at Socket.<anonymous> (/home/me/Desktop/projetoNodeJs/node_modules/mysql/lib/Connection.js:526:10)
at Socket.emit (events.js:400:28)
at addChunk (internal/streams/readable.js:293:12)
--------------------
at Protocol._enqueue (/home/me/Desktop/projetoNodeJs/node_modules/mysql/lib/protocol/Protocol.js:144:48)
at Protocol.handshake (/home/me/Desktop/projetoNodeJs/node_modules/mysql/lib/protocol/Protocol.js:51:23)
at Connection.connect (/home/me/Desktop/projetoNodeJs/node_modules/mysql/lib/Connection.js:116:18)
at Object.<anonymous> (/home/me/Desktop/projetoNodeJs/index.js:9:11)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:12)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
at internal/main/run_main_module.js:17:47 {
code: 'ER_ACCESS_DENIED_ERROR',
errno: 1045,
sqlMessage: "Access denied for user 'root'@'localhost' (using password: YES)",
sqlState: '28000',
fatal: true
}
Estou rodando mysql 8.0 no fedora.