Solucionado (ver solução)
Solucionado
(ver solução)
2
respostas

'access denied for user' Alguém sabe?

fretappdev@fretapp-dev:~/Área de Trabalho/api-petshop$ node api/banco-de-dados/criarTabelas.jsAccessDeniedError [SequelizeAccessDeniedError]: Access denied for user 'root'@'localhost' (using password: YES) at ConnectionManager.connect (/home/fretappdev/Área de Trabalho/api-petshop/node_modules/sequelize/dist/lib/dialects/mysql/connection-manager.js:94:17) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async ConnectionManager.connect (/home/fretappdev/Área de Trabalho/api-petshop/nodemodules/sequelize/dist/lib/dialects/abstract/connection-manager.js:216:24) at async /home/fretappdev/Área de Trabalho/api-petshop/node_modules/sequelize/dist/lib/dialects/abstract/connection-manager.js:174:32 at async ConnectionManager.getConnection (/home/fretappdev/Área de Trabalho/api-petshop/node_modules/sequelize/dist/lib/dialects/abstract/connection-manager.js:197:7) at async /home/fretappdev/Área de Trabalho/api-petshop/node_modules/sequelize/dist/lib/sequelize.js:303:26 at async MySQLQueryInterface.createTable (/home/fretappdev/Área de Trabalho/api-petshop/node_modules/sequelize/dist/lib/dialects/abstract/query-interface.js:94:12) at async Function.sync (/home/fretappdev/Área de Trabalho/api-petshop/node_modules/sequelize/dist/lib/model.js:930:5) { parent: Error: Access denied for user 'root'@'localhost' (using password: YES) at Packet.asError (/home/fretappdev/Área de Trabalho/api-petshop/node_modules/mysql2/lib/packets/packet.js:728:17) at ClientHandshake.execute (/home/fretappdev/Área de Trabalho/api-petshop/node_modules/mysql2/lib/commands/command.js:29:26) at Connection.handlePacket (/home/fretappdev/Área de Trabalho/api-petshop/node_modules/mysql2/lib/connection.js:456:32) at PacketParser.onPacket (/home/fretappdev/Área de Trabalho/api-petshop/node_modules/mysql2/lib/connection.js:85:12) at PacketParser.executeStart (/home/fretappdev/Área de Trabalho/api-petshop/node_modules/mysql2/lib/packet_parser.js:75:16) at Socket. (/home/fretappdev/Área de Trabalho/api-petshop/node_modules/mysql2/lib/connection.js:92:25) at Socket.emit (node:events:390:28) at addChunk (node:internal/streams/readable:315:12) at readableAddChunk (node:internal/streams/readable:289:9) at Socket.Readable.push (node:internal/streams/readable:228:10) { code: 'ER_ACCESS_DENIED_ERROR', errno: 1045, sqlState: '28000', sqlMessage: "Access denied for user 'root'@'localhost' (using password: YES)", sql: undefined

2 respostas
solução!

Tive o mesmo problema. Minha senha estava incorreta mesmo!

De fato! Quando observei minha senha na pasta 'config', percebi que havia colocado uma senha diferente da minha kkkkkkkk.