All Questions
119
questions
0
votes
1
answer
78
views
Read whole .SQL file and generate JSON format database tables, without using any database server
I have specific .sql file to create new database and table, insert data.
I can parse the database and tables with MariaDB server and simple node.js application.
(Just read .sql file and run each SQL ...
0
votes
1
answer
672
views
Error "retrieve connection from pool timeout" when attempting to connect Node.js to MariaDB database hosted on Azure
Problem Statement
As the title suggests, I am trying to connect to a MariaDB database hosted on Azure with Node.js but I'm unable to identify the root cause of this error message.
% node dbTest.js ...
1
vote
1
answer
230
views
Locking and Skipping Locked Rows in MariaDB
In the database, there are 2 rows that match the query condition. If we run two parallel queries, the first query locks both rows and returns one, while the second query returns null.
It would be ...
0
votes
1
answer
32
views
iteration through JSON Object fails at TIMESTAMP
I want to get through all the JSON data which is presented by the MySQL(MariaDB) DB Response.
I found a function to iterate through to get & log the key:values pairs.
After that I want to send all ...
0
votes
1
answer
680
views
Dynamically create INSERT query using Javascript object with MariaDB/node.js
I want to insert key/value pairs of data into a mariaDB using MariaDB Node.js Connector
Data object:
The key in my data object corresponds to the column identifier of my SQL table
I have around 15 ...
3
votes
2
answers
799
views
why is my Node/Express application leaking MySQL connections?
I just don't understand why the below code opens a new connection/pool for every request it gets. As a result, this code generates hundreds of open connections and eventually crashes within an hour or ...
0
votes
1
answer
68
views
How to check if NodeJS is connected to a MySQL server or a MariaDB server?
So here is the thing: My program used the json type in MySQL, which in MariaDB, would be translated as LONGTEXT. This created a problem since the client is returning a string instead of a JSON Object ...
1
vote
1
answer
174
views
Why is the same query on MariaDB taking more time when run via Sequelize from the application versus running it directly on the mysql client or CLI?
For the following MariaDB schema:
meta_schema_version
id (int)
namespace_id (int)
version (varchar(10))
schema (longtext)
comment (mediumtext)
created_at (datetime)
meta
id (int) [PK]
meta_id (int)
...
1
vote
1
answer
2k
views
Connection refused when connecting to MySql using NodeJS mysql2
I am running a NodeJS app hosted on a (linux) dedicated Plesk server, under a subdomain.
Trying to connect to a MariaDB mysql server.
The NodeJS code:
const mysql = require('mysql2');
const con = ...
1
vote
0
answers
105
views
Use object keys given by JSON_SEARCH to find a different key in the same object in mysql/mariadb
I have some records of payments in the database and I keep the items belonging to the payment as a JSON(LONGTEXT) column in mariadb. For example the items columns would be like below.
items
[{"...
0
votes
1
answer
543
views
Use 1 single MySQL connection to provide result to multiple Users
I have used one signle connection object of MYSQL in node JS to serve for multiple users.
I mean to say that MySQL connection will be created upon starting the script & it will remain same until ...
1
vote
0
answers
385
views
MySQL / Mariadb - Duplicate entry '1' for key *****
So I migrated a NodeJS backend from express to NestJS + TypeORM
But now I keep getting this error:
Duplicate entry '1' for key 'IDX_b37305d1c6376498a51b97ce1a
But where ever I look in the database, ...
1
vote
0
answers
434
views
I can't connect my nodejs server to my mariadb raspberry pi
I'm trying to make a forum with a mariadb database on my raspberry pi (the nodejs server is on my computer and the database is on my raspberry)
I can't connect to my raspberry pi with a user...
i get ...
0
votes
1
answer
170
views
nodejs + sequelize (MariaDB) model.count() returning NaN
When I am using sequelize with postgres. Its working fine but when I am using mariaDB strange issue happening.
let emailExists = await models.user.count({
where: {
id,
email,
...
1
vote
0
answers
112
views
How to add no auto rehash option in nodejs mariadb connector?
When i connect to maridb using command line, it takes lot of time to load all the database schema and tables (roughly 10 minuntes). However, adding -A argument in command line saves the time and ...