All Questions
11,853 questions
1
vote
1
answer
114
views
How to upload blob image to mysql database and display it as an object url?
Using Node Js Multer I am uploading an image to the database as a blob. This happens from javascript ajax xmlhttp request to express js endpoint.
index.html uploading image request
input....
0
votes
0
answers
21
views
Nextjs Nodejs Mysql Error: Can't add new command when connection is in closed state
this is my database options:
db.js
import mysql from "mysql2"
let connect = mysql.createConnection({
host: "localhost",
user: "root",
password: "",
...
0
votes
1
answer
50
views
When in run my backend locally keep getting db(mysql) connection error
In my app today, when I try and run the backend(nodejs and mysql) (using command node server.js), it gives me the error message Database connection failed: Error: Connection lost: The server closed ...
0
votes
0
answers
42
views
MySQL + Node/Python transaction locking between two connections
I have an issue where by two database connections (connA and connB) appear to not correctly lock a table and connB is able to commit an update for which I believe connA has the lock.
Imaginary table
...
1
vote
1
answer
57
views
mysql2 ETIMEDOUT error with rate-limiter-flexible, but Sequelize connects fine
I'm working on a Node.js backend project and have run into a strange issue involving MySQL connections. Here's the situation:
I am using a MySQL database hosted on Digital Ocean (Managed MySQL ...
0
votes
0
answers
40
views
How to get average on timestmapDiff in prisma queries
I am trying to get convert a raw sql query to prisma, but i can't find a way to average on a "virtual" column which is the difference between 2 date columns
IFNULL(AVG(CASE WHEN end_time IS ...
-5
votes
1
answer
68
views
How to store images in MySQL hosted in Hostinger thorough Nodejs?
I want to store images in Database. My database is hosted in hostinger and my whole website is hosted in hostinger.
I have tried with this code.
const express = require("express");
const ...
0
votes
1
answer
63
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 ...
0
votes
0
answers
44
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
224
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
57
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
80
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
63
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
28
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,...