Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
0 answers
12 views

Unable to Establish Connection from Node.js Application to Remote MySQL Database on NameCheap via SSH Tunnel

I'm having trouble setting up a connection from my Node.js application to a remote MySQL database hosted on NameCheap. I've tried multiple approaches, but nothing seems to work. What I've tried so ...
GameOwner's user avatar
0 votes
0 answers
12 views

Connection refused when using Sequelize with MySQL running on Docker [duplicate]

I am building a dockerized API with MYSQL. I have already set up a network between the two services but Sequelize is returning a connection refused error. Here is my Dockerfile for the API FROM node:...
Emerson Lima's user avatar
-3 votes
0 answers
26 views

Does sequelize sanitize enough inputs? [closed]

I was wondering since I use Sequelize for all my queries. Should I even bother sanitizing inputs since Sequelize handles that? If yes, In what specific I do need to sanitize the inputs? And since I'm ...
Marko's user avatar
  • 1
0 votes
0 answers
11 views

SequelizeConnectionAcquireTimeoutError: Best Practices for Using Sequelize ORM in Node.js Application

I’m using Sequelize ORM in my Node.js application, and I’m encountering an issue where I sometimes get a SequelizeConnectionAcquireTimeoutError. I’d like to get feedback on whether my approach is ...
Parishilan Rayamajhi's user avatar
0 votes
0 answers
41 views

Node - MySQL2 not dropping idle connections using pools

We are starting to push out our web app out to users for testing and we are running into any issue with the MySQL connections. After a while the database calls just stop working and I go out to our ...
dmikester1's user avatar
  • 1,272
0 votes
0 answers
38 views

Why in my code I always get User 'bb0d9bead54859' has exceeded the 'max_user_connections' resource (current value: 20)

I just deployed an app on Heroku and I have errors with my code and my database. In the database panel in Heroku there are a lot of connections which are not closing. I'm using connections pools and ...
user26886705's user avatar
0 votes
0 answers
36 views

Sequalize to write raw sql join query

I have this query in sql, const query = ` SELECT prdtl.pono, prdtl.desgcode, d.descr, g.grn_dt, IFNULL(g.grnQty, 0) AS grnQty, IFNULL(gd.gdnQty, 0) AS gdnQty ...
Bappa Banerjee's user avatar
-1 votes
0 answers
17 views

NodeJS Xampp mysql Error: Access denied for user 'root'@'localhost' (using password: YES) [duplicate]

I've created a react app with a backend using NodeJS and my database is running with xampp here is my code to connect to my dbh : const mysql = require("mysql2"); const connection = mysql....
maxyme jarrier's user avatar
-2 votes
1 answer
67 views

Password mismatch issue with bcryptjs in Angular, NodeJS, and MySQL

I've recently got myself in a problem while I was doing a personal project using Angular, NodeJS and MySQL. I was doing the sign up and log in processes and I decided to encrypt password using ...
Sithila Somaratne's user avatar
0 votes
0 answers
43 views

Can't fetch users data from MySQL DB

I am using React JS for the front end and Node JS for the backend, no matter what i try i somehow can't fetch the users data from my DB so i can display it on the front-end, here's my code i hope ...
MehDi_TsM's user avatar
0 votes
0 answers
33 views

How to reset MySQL connection in Node.js

I'm running a small MySQL database locally on my computer for a personal project. To make entering data easier, I wrote up a bare-bones website interface. Everything works fine, the data gets put in ...
Kevin2Holt's user avatar
0 votes
0 answers
57 views

How to execute a JavaScript Stored Function in MySQL 9.0 using NodeJS and Postman?

I recently came across the new features in MySQL 9.0 and found out about JavaScript Stored Programs in this link and in the MySQL docs. I also read this part about the new feature here. So, I decided ...
Sithila Somaratne's user avatar
-2 votes
0 answers
25 views

Sequelize + Node.js + MySQL API not working after building with Webpack

I’m developing an API using Node.js, Sequelize, and MySQL. The application works fine during development, but when I build the application using Webpack, the API fails to work as expected. I’m not ...
Tharindu Lakshan's user avatar
0 votes
0 answers
15 views

Issue Using sequelize.col with findAndCountAll and include in Sequelize with Join Table

Description: I'm encountering an issue in a Sequelize project when trying to use sequelize.col() to select fields from associated models. The setup involves two main models, Student and User, where ...
cesaralvarod's user avatar
0 votes
0 answers
13 views

net::ERR_CONNECTION_REFUSED website displayed but data not received [duplicate]

i use nodejs reactjs express mariadb, when i launch my web app and trying to access it from another machine in my local network the web app is displayed normally but data not received from the ...
lag mof's user avatar
-1 votes
0 answers
29 views

I'm having a hard time to analyze/learn this SQL ERROR [duplicate]

I'm trying to insert datas to my purchase_order table and purchase_order_item simultaneously, my problem is either, (intermediate value) is not iterable or getting the sql format error Please give me ...
Timothy Tizon's user avatar
0 votes
3 answers
33 views

strapi db connection error with mysql remote db

Error: Access denied for user 'pool18'@'192.168.105.3' (using password: YES) │ │ at Packet.asError ...
somji katiyar's user avatar
0 votes
1 answer
46 views

how to properly reserve/lock a seat in a booking application

I am building a booking system for clients who want users to book rooms, food, travel, and events. Since there are a limited number of rooms and seats in any event, how do I handle the logic of ...
vandit vasa's user avatar
1 vote
0 answers
36 views

Node zlib: throwing incorrect header check while inflating or unzipping

I have a varbinary type column jsonBin in db. I want to store json (string) which is compressed using zlib. zlib.gzipSync(data) or zlib.deflateSync(data) returns buffer object. If I use base64 ...
Piyush's user avatar
  • 11
-1 votes
2 answers
42 views

Can i make a flexible function that can get * from different tables? [duplicate]

I am trying to create a function that can select from different tables in mysql My Function async function getOne(table, table_parameter, parameter) { const result = await pool.query( `SELECT * ...
Aleksei Yin's user avatar
0 votes
0 answers
22 views

ER_NOT_SUPPORTED_AUTH_MODE Error even though mysql2 is being used [duplicate]

I am receiving an error ERROR [ExceptionHandler] ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client every time I try to ...
CairoMisr's user avatar
0 votes
1 answer
35 views

ORM Sequelize model.upsert() is not a function

Version sequelize 6.37.3 I try to upsert() myModel but the mehtod returns: TypeError: model.upsert is not a function my_model.controller.ts ... class MyModelController { private model: any; ....
rammi22's user avatar
  • 405
0 votes
0 answers
42 views

While running server.js in kubernetes pods getting errors connect ETIMEDOUT

Error connecting to the database server: Error: connect ETIMEDOUT at Connection._handleTimeoutError (/usr/src/app/node_modules/mysql2/lib/connection.js:205:17) at listOnTimeout (internal/timers.js:557:...
Pranay Masurkar's user avatar
0 votes
1 answer
40 views

How to get Sequelize to recognize by primary key with MySQL database data set and fix bulkCreate() issue?

So I have a database where I am trying to establish a one-to-many relationship between Supplier and TreeSeed, whereby one Supplier can sell many TreeSeed. I have looked at the sequelize documentation ...
RendezYT's user avatar
0 votes
1 answer
59 views

How to get Sequelize to recognize my custom foreign key and primary keys in a one-to-many relationship in MySQL during bulkcreate insert?

I am building a plant/arboretum style application in JavaScript. I am trying to create a one-to-many relationship between Supplier model and TreeSeed model. Meaning that one supplier can sell multiple ...
RendezYT's user avatar
0 votes
0 answers
26 views

await is only valid in async functions and the top level bodies of modules nodejs [duplicate]

Basically using Nodejs I connect to mysql and create a pool using below code which works fine, db.js const mysql = require("mysql") exports.database = mysql.createPool({ host: "...
micronyks's user avatar
  • 55.2k
0 votes
0 answers
21 views

Mysql rows transposing in Node.js with mysql2 [duplicate]

I am running an SQL script in Node.js using mysql2 npm-package. This script has multiple SQL statements that have to ultimately transpose a table's rows into columns. The SQL script runs correctly ...
john k.w's user avatar
-1 votes
2 answers
95 views

MySQL insert query successful but not inserting into database table

I am working on a React/MySQL registration page. The insert query runs, but is not inserting into the database table. I am not sure why. In the backend folder, I have my server.js file: const ...
John Beasley's user avatar
  • 2,891
0 votes
0 answers
25 views

Backend container connection issue to production database container in docker

I'm trying to link 3 containers run by Docker to a production stage. The first container is hosting a vuejs 3 application and runs smoothly. The issue arrives when I use the command : sudo docker ...
RemHD's user avatar
  • 11
0 votes
1 answer
33 views

Sequelize code first with mysql cannot generate database

I am facing an issue related to sequelize when generating the database by commandline npx sequelize-cli db:migrate The firsting I installing my sql and using MySQL Workbench to connect it -> ...
hhpr98's user avatar
  • 65
0 votes
0 answers
57 views

How to upsert data in mysql in NodeJS

I'm using MySQL for the first time through a NodeJS application. I'm managing to insert into a table, but I'm attempting to adapt my code to upsert the data instead, if a value matches. I've been ...
SosijElizabeth's user avatar
0 votes
0 answers
27 views

How to Efficiently Handle Real-Time Forex Data Updates and Database Synchronization in Node.js?

I'm developing a Forex trading application using Node.js, where I need to handle real-time updates for around 600 currency pairs. The data comes from a FIX protocol engine and needs to be updated in ...
TechnoDeveloper's user avatar
0 votes
1 answer
107 views

TypeError: pool.promise is not a function

I am using mysql2 library for connecting to database. const pool = mysql.createPool({ connectionLimit: process.env.DB_CONNECTION_LIMIT, host: process.env.DB_HOST, user: process.env.DB_USER, ...
Rajat Aggarwal's user avatar
0 votes
1 answer
23 views

How do I search an entry in database by the same search phrase for two separate models with reference in sequelize?

I'm trying to make a search in a database for invoices. In the server request handler I have only one thing: searchPhrase. So I have to search invoice by serial number of the invoice, and also by ...
justelio19's user avatar
0 votes
0 answers
39 views

Error connecting to the database: getaddrinfo ENOTFOUND when trying to connect to mysql container using node js

and I keep getting this error when trying to connect to my mysql image through in node.js project Error connecting to the database: getaddrinfo ENOTFOUND 98b6c7aeb8af I can access the container fine ...
Danichayes's user avatar
0 votes
0 answers
21 views

Deploy MERN app on cpanel and whm using physical server

I am trying to install my development project on server for production throw cpanel and whm, server is physical and I am using ubuntu, what is the steps, without affecting any other deployed websites, ...
Abdelrahman Ashraf's user avatar
0 votes
0 answers
26 views

I am unable to filter data in many to many relationship in sequelize

I have three tables/models in sequelize, Teachers, Classes, and Divisions. I have established many to many relationship between Teachers and Divisions. and One to Many relationship between Classes and ...
Nitin C's user avatar
  • 23
0 votes
0 answers
140 views

Nest js, TypeOrm Connection close issue

I'm using NestJs, and Typeorm (MySQL driver). From time to time I get the 'Connection lost: The server closed the connection.' error. The server that I'm using closes the connection after 10-15 ...
Vlad Lew's user avatar
0 votes
1 answer
34 views

Sequelize query to filter records created one year ago based on created_at date

I'm working with Sequelize in a Node.js application and need to write a query that retrieves data where the created_at date is exactly one year old. Here's the current query I'm using: const newGrants ...
Numaira Nawaz's user avatar
0 votes
0 answers
15 views

How to solve many-to-many relationship for inserting an element in Sequelize?

I have the following tables in my MySQL database: CREATE TABLE idi_ma_products ( id INT AUTO_INCREMENT PRIMARY KEY, title VARCHAR(200), image VARCHAR(255), created_date DATE, ...
Sebastian Narvaez's user avatar
0 votes
0 answers
20 views

Trouble Generating Tables Automatically in Nodejs Using Sequelize mySQL 2

I'm encountering an issue where I'm unable to automatically create an "employee" table using Sequelize in my Node.js application. Strangely, while my "user" table gets created ...
Arjun Chand's user avatar
0 votes
0 answers
38 views

Multiple http requests to backend with nodejs and sequelize

I am developing a service in NodeJS using Express and Sequelize as ORM. I am also using the Serverless Offline plugin to emulate AWS Lambdas and I also deploy my backend in AWS Lambdas. My question is ...
usuario's user avatar
0 votes
1 answer
185 views

Inconsistent behavior with Sequelize .forEach() in MySQL vs. SQLite when updating records

I encountered a strange behavior with Sequelize when using MySQL. This script creates a table with one column and then seeds a record into this table. It then uses .forEach() and for (const ... of ...)...
Gea-Suan Lin's user avatar
0 votes
0 answers
41 views

import SQL data into a database using Node.js and Sequelize

optimizing the execution time for inserting a large volume of data into the database using Sequelize Initially, I was running around 20,000 queries individually through Sequelize, but it was taking ...
Adan Op's user avatar
0 votes
0 answers
13 views

Connect VPS Server with my mysql database [duplicate]

I have hostinger VPS server and there I uploaded the node.js code with all its necessary modules. But when I try to connect with database using GET API, It gives error { "success": false, ...
Muhammad TaQi's user avatar
0 votes
1 answer
28 views

Getting error in fetching data with Sequelize for Mysql Database (Backend Node.js)

I am using Sequelize ORM with mysql database for nodejs application. Somewhere I am stuck with one api whose job is just to show list based on the queryparam values. Issue is when I am not applying ...
user23602596's user avatar
0 votes
0 answers
50 views

Sequelize findAndCountAll with literal count and having clause and subquery getting column not found on subquery column for count,

Sequelize findAndCountAll with having clause and subquery getting column not found on subquery column for count, tried subQuery:false and subQuery:true but not worked, tried with finAll but i need ...
smzhzr's user avatar
  • 3
1 vote
1 answer
130 views

Prisma One to Many relation not visible in database and connect option not working

this is Prisma Schema generator client { provider = "prisma-client-js" } datasource db { provider = "mysql" url = env("DATABASE_URL") relationMode = ...
El-Baraa Radwan's user avatar
0 votes
0 answers
19 views

How to connect my local Node server with remote MYSQL db, via SSH and using sequelize

Im using Datagrip to manage the DB and all work just fine, i made the SSH connection then the DB connection and work perfect. im trying to do the same with my NODE server. I got a virtual machine ...
luis miguel castro martinez's user avatar
0 votes
0 answers
36 views

MySQL Master Slave substitution problem in Node.js

I'm trying to configure master slave in nodejs web. I want to connect to the slave server when the master one is collapsed. I tried to stop the master and it really connected to the slave. However, ...
Nguyễn Trangg's user avatar

1
2 3 4 5
239