1

I followed this tutorial: https://bezkoder.com/node-js-express-sequelize-mysql/

My code is identical, only the port I use changes, but despite that I have the following error:

Server is running on port 3000.
(node:22880) UnhandledPromiseRejectionWarning: SequelizeConnectionError: connect ETIMEDOUT
    at ConnectionManager.connect (C:\Users\rutig\OneDrive\Desktop\node\node_modules\sequelize\lib\dialects\mysql\connection-manager.js:126:17)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async ConnectionManager._connect (C:\Users\rutig\OneDrive\Desktop\node\node_modules\sequelize\lib\dialects\abstract\connection-manager.js:318:24)
    at async C:\Users\rutig\OneDrive\Desktop\node\node_modules\sequelize\lib\dialects\abstract\connection-manager.js:250:32
    at async ConnectionManager.getConnection (C:\Users\rutig\OneDrive\Desktop\node\node_modules\sequelize\lib\dialects\abstract\connection-manager.js:280:7)
    at async C:\Users\rutig\OneDrive\Desktop\node\node_modules\sequelize\lib\sequelize.js:613:26
    at async MySQLQueryInterface.createTable (C:\Users\rutig\OneDrive\Desktop\node\node_modules\sequelize\lib\dialects\abstract\query-interface.js:225:12)
    at async Function.sync (C:\Users\rutig\OneDrive\Desktop\node\node_modules\sequelize\lib\model.js:1300:5)
    at async Sequelize.sync (C:\Users\rutig\OneDrive\Desktop\node\node_modules\sequelize\lib\sequelize.js:793:35)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:22880) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:22880) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

I don't understand why the exact same files work for other people and not for me.

Kevin Nett
  • 429
  • 3
  • 10
  • Q: I don't understand why the exact same files work for other people and not for me. A: That's *NOT* the right question to be asking ;) BETTER: Q: Why is my NodeJS app getting ETIMEDOUT trying to connect to MySQL? A: I *hope* mysql is running, and I hope it's co-located on the same host as your NodeJS app. You can also increase the timeout value, if you're confident a connection is possible: https://stackoverflow.com/a/23633266/421195 – paulsm4 Sep 21 '20 at 01:47

0 Answers0