Rodrigo, eu tentei com o mesmo código que foi disponibilizado na etapa 1 do curso, e ainda deu erro de conexão.
percebe-se que não é o mesmo erro, porém todos dois derivam de SequelizeConnectionError..
eu chego a achar que é algo nas permissões do linux com o mysql.
pois se eu executar como sudo, ele loga no mysql sem precisar inserir a senha do default.json
{ SequelizeConnectionError: Access denied for user 'root'@'localhost'
at ConnectionManager.connect (/home/nathanjfa/Documents/Curso NodeJS arquivos da aula/pt1/api-petshop-aula-1/node_modules/sequelize/lib/dialects/mysql/connection-manager.js:126:17)
at process.tickCallback (internal/process/nexttick.js:68:7)
name: 'SequelizeConnectionError',
parent:
{ Error: Access denied for user 'root'@'localhost'
at Packet.asError (/home/nathanjfa/Documents/Curso NodeJS arquivos da aula/pt1/api-petshop-aula-1/node_modules/mysql2/lib/packets/packet.js:712:17)
at ClientHandshake.execute (/home/nathanjfa/Documents/Curso NodeJS arquivos da aula/pt1/api-petshop-aula-1/node_modules/mysql2/lib/commands/command.js:28:26)
at Connection.handlePacket (/home/nathanjfa/Documents/Curso NodeJS arquivos da aula/pt1/api-petshop-aula-1/node_modules/mysql2/lib/connection.js:417:32)
at PacketParser.Connection.packetParser.p [as onPacket] (/home/nathanjfa/Documents/Curso NodeJS arquivos da aula/pt1/api-petshop-aula-1/node_modules/mysql2/lib/connection.js:75:12)
at PacketParser.executeStart (/home/nathanjfa/Documents/Curso NodeJS arquivos da aula/pt1/api-petshop-aula-1/node_modules/mysql2/lib/packet_parser.js:75:16)
at Socket.Connection.stream.on.data (/home/nathanjfa/Documents/Curso NodeJS arquivos da aula/pt1/api-petshop-aula-1/node_modules/mysql2/lib/connection.js:82:25)
at Socket.emit (events.js:198:13)
at addChunk (streamreadable.js:288:12)
at readableAddChunk (streamreadable.js:269:11)
at Socket.Readable.push (streamreadable.js:224:10)
code: 'ER_ACCESS_DENIED_NO_PASSWORD_ERROR',
errno: 1698,
sqlState: '28000',
sqlMessage: 'Access denied for user 'root'@'localhost'' },
original:
{ Error: Access denied for user 'root'@'localhost'
at Packet.asError (/home/nathanjfa/Documents/Curso NodeJS arquivos da aula/pt1/api-petshop-aula-1/node_modules/mysql2/lib/packets/packet.js:712:17)
at ClientHandshake.execute (/home/nathanjfa/Documents/Curso NodeJS arquivos da aula/pt1/api-petshop-aula-1/node_modules/mysql2/lib/commands/command.js:28:26)
at Connection.handlePacket (/home/nathanjfa/Documents/Curso NodeJS arquivos da aula/pt1/api-petshop-aula-1/node_modules/mysql2/lib/connection.js:417:32)
at PacketParser.Connection.packetParser.p [as onPacket] (/home/nathanjfa/Documents/Curso NodeJS arquivos da aula/pt1/api-petshop-aula-1/node_modules/mysql2/lib/connection.js:75:12)
at PacketParser.executeStart (/home/nathanjfa/Documents/Curso NodeJS arquivos da aula/pt1/api-petshop-aula-1/node_modules/mysql2/lib/packet_parser.js:75:16)
at Socket.Connection.stream.on.data (/home/nathanjfa/Documents/Curso NodeJS arquivos da aula/pt1/api-petshop-aula-1/node_modules/mysql2/lib/connection.js:82:25)
at Socket.emit (events.js:198:13)
at addChunk (streamreadable.js:288:12)
at readableAddChunk (streamreadable.js:269:11)
at Socket.Readable.push (streamreadable.js:224:10)
code: 'ER_ACCESS_DENIED_NO_PASSWORD_ERROR',
errno: 1698,
sqlState: '28000',
sqlMessage: 'Access denied for user 'root'@'localhost'' } }