Ошибка при работе с БД на сервере Node js, как решить?

Возникла вот такая вот проблема при подключении к БД на сервере, хотя на VPS и локалке все работает отлично, в чем может быть проблема, вот сама ошибка
(node:450273) UnhandledPromiseRejectionWarning: Error: connect ECONNREFUSED 127.0.0.1:3306
    at Object.createConnection (/home/vek21/app_node/depended_field_api/node_modules/mysql2/promise.js:242:31)
    at /home/vek21/app_node/depended_field_api/dist/models/create.js:19:48
    at Generator.next (<anonymous>)
    at /home/vek21/app_node/depended_field_api/dist/models/create.js:8:71
    at new Promise (<anonymous>)
    at __awaiter (/home/vek21/app_node/depended_field_api/dist/models/create.js:4:12)
    at create_table_if_not_exists_model (/home/vek21/app_node/depended_field_api/dist/models/create.js:18:54)
    at /home/vek21/app_node/depended_field_api/dist/controllers/create_controller.js:16:57
    at Generator.next (<anonymous>)
    at /home/vek21/app_node/depended_field_api/dist/controllers/create_controller.js:8:71
(Use `node --trace-warnings ...` to show where the warning was created)
(node:450273) 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:450273) [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.
^C
  • Вопрос задан
  • 107 просмотров
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы