All Questions
11,899 questions
-2
votes
0
answers
33
views
How to Deploy a Node.js (TypeScript + Prisma) REST API on Namecheap Shared Hosting? [closed]
I have a Node.js REST API written in TypeScript, using Prisma ORM with a MySQL database.
For testing, I deployed it to Railway, which worked fine because it pulled from GitHub and managed deployments ...
-3
votes
0
answers
50
views
Why am I getting error: is not a function? [duplicate]
I have:
/services/db.js
import mysql from "../node_modules/mysql2/promise.js";
import config from "./config.js";
async function query(sql, params) {
const connection = await ...
-1
votes
0
answers
21
views
Can't connect to MYSQL from Node.js which is on another droplet [duplicate]
Here is error :
pm2 logs server [TAILING] Tailing last 15 lines for [server] process
(change the value with --lines option)
/root/.pm2/logs/server-error.log last 15 lines: 0|server | code:
'...
0
votes
1
answer
47
views
How to compare using bcrypt in a db query using node.js and express
First off, I'm new to using express and this is my first attempt at creating an authentication page. I've connected to a MySQL database and successfully queried the database unhashed passwords, but as ...
-2
votes
0
answers
15
views
node backend connection error with database ECONNRESET [duplicate]
i create a backend in node with data base mysql,i set my data base on hostinger and connec it to the backend on local ,it connects sucessfully with the database and after some time may be 1 min no ...
0
votes
0
answers
38
views
Pagination on high amount of rows using Sequelize and MySQL
I am using Sequelize with Node for my backend.
One of my tables is probably going to grow a lot in the coming weeks (at this moment, the table is around 1-2M rows).
I added 30M lines and added the ...
0
votes
0
answers
113
views
MySQL error with prepared statements: Can't create more than max prepared_stmt_count statements
I'm encountering an issue with my backend database operations resulting in the following error:
execute error: Error: Can't create more than max_prepared_stmt_count statements (current value: 16382)
...
-1
votes
1
answer
28
views
Connecting mysql workbench to node.js [duplicate]
My first time using mysql workbench and I don't know how to connect it to my school management project I'm building using node.js
After downloading mysql workbench and installation, I set up my server ...
0
votes
0
answers
30
views
How to move ORDER BY into Subquery AFTER LIMIT without using subQuery: false? [duplicate]
How do I move ORDER BY into a subquery right after LIMIT without using subQuery: false?
This is my Sequelize query:
return await this._conversation.findAll({
// subQuery: false,
where: params....
-4
votes
1
answer
59
views
When fetched, date is shows as one day behind. The DB has correct data stored [closed]
I have a Node.js and MySQL project. The user inputs the date from a dropdown and submits the form. In the backend, I see proper date but when I fetch it, its 1 day behind. I've read that it might be a ...
0
votes
0
answers
60
views
How to call a stored procedure by using Javascript?
server.js:
const express = require('express');
const mysql = require('mysql2');
const path = require('path');
const app = express();
app.use(express.json());
const db = mysql.createConnection({
...
0
votes
0
answers
27
views
Intermittent Connection Issues with Sequelize Migrations in Docker Compose Setup [duplicate]
I am using Docker Compose to set up my application, which consists of three services: a MySQL database, a backend API, and a Vue.js frontend. My backend uses Sequelize for database migrations.
However,...
0
votes
1
answer
40
views
Sequelize create() not working for inserting an order, but manual SQL query works
I am trying to create an order using Sequelize in my Node.js app, but I'm encountering issues with both the Order.create() method and a manual INSERT INTO query.
Here is the code I'm using to create ...
-3
votes
1
answer
48
views
Mysql is closing the connection on Ubuntu
Hi I built a MERN app (used mysql instead of MongoDB)
deployed it on the VPS (Ubuntu 24.04) everything seems okay but
when I try to check the logs of my backend using pm2 package it gives
me kind of ...
0
votes
0
answers
63
views
Values are returning null objects despite existing in mysql db
I am perplexed as to why my values are returning as object types instead of number/int types even though they are defined as such, in addition, there are values existing in the table but upon ...
0
votes
0
answers
22
views
nodeJs mysql connection can't end before other queries finished
I am using nodeJs with the mysql package to query my database. The thing is that after creating the connection I query for some rows and forEach row I need to do some operations that include also new ...
0
votes
1
answer
34
views
ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server
var mysql = require('mysql');
var con = mysql.createConnection({
host: "localhost",
user: "eladqw",
password: "******",
port:3306,
options: {
...
1
vote
1
answer
69
views
Do I need to use await when calling connection.release() in mysql2? [closed]
I'm working with the mysql2 Node.js library and managing connections through a connection pool. In some of the examples I've seen, connection.release() is called with await, but based on the ...
-1
votes
3
answers
62
views
Change Data Type for MYSQL UPDATE for error 1292 Truncated Error Double Value on WHERE failing on VARCHAR(45)
I have looked at all error 1292 Truncated Error Double Value questions, but have not been able to derive a solution from them.
Answers have however led me to an assumtion that I am failing to prove:
I ...
0
votes
1
answer
32
views
In nodejs (sequelize), Add new key or column in MySql via migration
In nodejs (sequelize) ,Add new key or column in MySql via migration but it is not defined in the model so how it update automatically in the model
I have make new migration on adding new column and ...
0
votes
0
answers
28
views
Squelize Sort By Included Model
I'm struggling to sort cases by the patients first name. I've tried nearly every possibility I feel like I could and still nothing. For some reason, it's changing the column name and then it can't ...
0
votes
1
answer
40
views
Sequelize: User is not associated to Commentaire
I am working with two Sequelize models: User and Comment. Each Comment belongs to a User, and a User can write multiple comments. My goal is to include all comments associated with each user in my ...
0
votes
0
answers
34
views
Sequelize many-to-many relation query search very slow
I use nodejs, mysql and sequelize. I have 3 model: Post , Tags and PostToTags. I add many-to-many relation between Post and Tags. Post model have title, content attributes. Tags model have title and ...
0
votes
0
answers
15
views
Typeorm create tables based on selected entities
Currently, I am working on creating the database and then table structure based on all the available entity classes but I need to make the tables for some of the entities, not all the entities based ...
0
votes
0
answers
83
views
Error: connect ECONNREFUSED 127.0.0.1:3306 at TCPConnectWrap.afterConnect [as oncomplete] on the Node js, typeorm and mysql project
I am getting an error on the Node JS, typeorm and mysql project when trying to connect to mysql.
I am new in Node js and mysql. Please help me to fix this issue.
I have shared code of index.ts file, ...
0
votes
1
answer
25
views
I want to Find data in Sequelize that createdAt and UpdateAt same Consider only date Not date time
const StudentAssessmentTransaction = sequelize.define(
"studentAssessmentTransaction",
{
id: {
type: DataTypes.INTEGER,
allowNull: false,
...
0
votes
0
answers
19
views
Dynamically call sequelize models using tablename
I have to call sequelize models dynamically using the tablenames, also include their associations dynamically. Is there a way to do this? Is it possible?
I have got the models dynamically but not ...
0
votes
1
answer
48
views
Connection denied with MYSQL db when node app dockerized [duplicate]
I have a problem with connecting my node app container to MySQL database. When -compose up I keep getting error from container logs:
server-1 | Unable to connect to database AccessDeniedError [...
0
votes
1
answer
28
views
array passed into Mysql query with nodejs only returning 1 result, not all [duplicate]
I have a sql statement/query in nodejs that should be returning 3 results, but it is only returning the first of three. (Not all results)
const { custuuid } = req.params;
var LocIds = req.query....
0
votes
0
answers
37
views
Access Denied Error when Connecting Node.js App to MySQL RDS Instance
I'm working on a Node.js application using mysql2/promise to connect to an Amazon RDS MySQL instance. Despite having correct credentials and network configurations, I'm encountering an Access denied ...
0
votes
0
answers
347
views
Using chaching_sha2_password but getting error: Plugin 'mysql_native_password' is not loaded
I just started working in mysql 8.4 and in my express backend I am connecting to mysql using mysql2. In the db I can see the user auth type is chaching_sha2_password, I made sure the dafault is also ...
0
votes
0
answers
76
views
Next JS 14 - MySQL connection load Schema
So, I have a NextJS 14 install. I have a MySQL connection setup and a schema.sql file that I load. Currently, I load the schema.sql on the route app/dashboard, but I don't want to execute my SQL code ...
0
votes
1
answer
49
views
MySql creating some tables and some not
The client wants us to use Mysql for his ecommerce website and as we are doing with the backend. For now I'm using mysql and when about to deployment we will migrate to some provider
This is the ...
0
votes
0
answers
21
views
How can I get my bluehost mysql server to work with react js, express / sequelize application? [duplicate]
While testing my application locally, I am able to create a database and populate it. When I try to use the app in production, it gives me a JSON error. I have created a user with password and granted ...
1
vote
0
answers
31
views
MySQL Pool Long-polling ETIMEDOUT and PROTOCOL_CONNECTION_LOST (Node.js)
I am developing software that runs 24/7 on PM2, performing long-polling by querying the database with SELECT statements every second (I also tried querying every 20 seconds, but that didn’t solve the ...
-2
votes
1
answer
70
views
data base queries in application is running on the local environment, but not on microsoft azure?
i created a project which is using external mysql database , the application has node.js backend and react frontend i am using azure static web-app, and it is deployed on microsoft azure but according ...
1
vote
0
answers
60
views
Umlauts not displaying correctly after a few requests in Angular application with Node.js Express backend and MySQL
I’m working on a full-stack application consisting of an Angular frontend and a Node.js Express backend. The backend communicates with a MariaDB database using the mysql2 library.
Everything worked ...
0
votes
1
answer
166
views
Sequelize (mysql): Max database connections reached frequently
I'm using Sequelize (v6.35) with MySQL + Express app, and I'm running into a problem where my database occasionally hits the max connections limit (500). This is happening once or twice a day, ...
0
votes
0
answers
146
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 ...
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:...
0
votes
0
answers
26
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 ...
1
vote
0
answers
151
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 ...
0
votes
0
answers
42
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 ...
0
votes
0
answers
39
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
...
0
votes
0
answers
35
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 ...
1
vote
1
answer
253
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 ...
0
votes
0
answers
18
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 ...
0
votes
3
answers
92
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 ...
0
votes
1
answer
179
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 ...
1
vote
0
answers
120
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 ...