Raw reject SequelizeConnectionRefusedError

I run my server.js file and I have this error:

 Unhandled rejection SequelizeConnectionRefusedError: connect ECONNREFUSED 127.0.0.1:4305 at Handshake._callback > (c:\Users\alexa\WebstormProjects\ToDoSPA\node_modules\sequelize\lib\dialects\mysql\connection-manager.js:76:20) at Handshake.Sequence.end (c:\Users\alexa\WebstormProjects\ToDoSPA\node_modules\mysql\lib\protocol\sequences\Sequence.js:96:24) at Protocol.handleNetworkError (c:\Users\alexa\WebstormProjects\ToDoSPA\node_modules\mysql\lib\protocol\Protocol.js:364:14) at Connection._handleNetworkError (c:\Users\alexa\WebstormProjects\ToDoSPA\node_modules\mysql\lib\Connection.js:384:18) at emitOne (events.js:77:13) at Socket.emit (events.js:169:7) at emitErrorNT (net.js:1253:8) at doNTCallback2 (node.js:452:9) at process._tickCallback (node.js:366:17) 

I do not understand why I am getting the above error.

+5
source share
2 answers

You did not start your database or incorrect database configuration, check the db configuration: var sequelize = new Sequelize(<your config>) or start the database

+2
source

Start the database server. This is because your database server is not running yet, so it refused to connect the application to the database.

+1
source

Source: https://habr.com/ru/post/1239033/


All Articles