944 questions
2 votes
1 answer
67 views
where to find format API reference?
i just discovered this (see top answer) where they used format() for bulk query, but i can't find format anywhere in both mysql and mysql2 docs. Does anyone know where to find it?
0 votes
1 answer
209 views
Trouble with mysql2 connection on a MySQL Server
I am currently having some trouble with connecting to an external database with my Windows client, using the gem mysql2. I set up a very basic debian MySQL Ver 8.4.5 server by following the official ...
0 votes
0 answers
73 views
Rails 5.2 with ruby 2.5.1 crash after upgrade from MariaDB (mysql 5.7) to Mysql 8 in Ubuntu 22
I have some Ruby on Rails projects on my computer running Ruby 2.5.1. I previously had MySQL 5.7 installed on my system (MariaDB). After upgrading to MySQL 8, these Ruby on Rails projects using Ruby 2....
0 votes
0 answers
24 views
Nodejs mysql2/promise deleted data problem
I am trying to resolve an issue in my app. The problem occurs when I delete data from the MySQL server; my Node.js app still displays the deleted data. However, once I edit any TypeScript (.ts) file ...
2 votes
3 answers
421 views
What's the benefit to using execute over query in mysql2?
When using the NodeJS mysql2 library, I am trying to understand the differences between Connection.execute and Connection.query. As I understand it, query prepares the statement locally and then makes ...
-1 votes
1 answer
187 views
How to fix the error for a Ruby on Rails project occurred after running bundle install
When trying to run bundle install to install missing gems for a rails project. It is throwing the error below- An error occurred while installing mysql2 (0.5.6), and Bundler cannot continue. In ...
0 votes
1 answer
59 views
Node js mysql map result to model
I am new to nodejs (typescript) and I am trying to retrieve data from an mysql database and map this to my model. But when I log my object later I can see all field of the database entity and not only ...
0 votes
1 answer
245 views
"This connection is in use by Fiber" error after upgrade to rails 7.2 and ruby 3.2.2
We meet error after app upgrade to rails 7.2 and ruby 3.2.2. ActiveRecord::StatementInvalid Mysql2::Error: This connection is in use by: #<Fiber:0x00007fad145210e8 (resumed)> It is occurred in ...
0 votes
0 answers
86 views
What is the proper way to integrate MySQL in Sveltekit?
I am struggling with integrating node-mysql2 into Sveltekit. As soon as the connection goes idle I get an 'ECONNRESET' error and my application freezes until the page is reloaded. Below is my db.ts ...
1 vote
1 answer
1k views
SSL is required, but the server does not support it Rails with MariaDB
I try to setup my Rails (6.1) server with MariaDB (10.11) but when i want create my database i got error : ActiveRecord::ConnectionNotEstablished: TLS/SSL error: SSL is required, but the server does ...
0 votes
1 answer
118 views
How to set up a Lambda Layer for Ruby's mysql2 library?
I've been trying to set up a Lambda Layer for my Ruby Lambda function but I can't make it work for some reason. I've followed AWS' tutorial on creating (https://docs.aws.amazon.com/lambda/latest/dg/...
0 votes
1 answer
168 views
Too many connections - NextJS14 + MySQL2
I'm currently creating a web-app for a project. It worked fine for a couple hours, then I experienced a "Too many connections" error on my MySQL database. So, I ran select count(host) from ...
0 votes
1 answer
2k 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
1 answer
101 views
How to handle error in express while using mysql2 module
//auth router.js const express = require("express"); const authService = require("../service/AuthService.js"); const router = express.Router(); router.post('/signup',async ...
0 votes
1 answer
81 views
problem with saving entity that includes another entity
I am new with NestJs and TypeOrm . my Database is Mysql2 . This is planOrder.entity // planOrder.entity import { Media } from 'src/media/media.entity'; import { Entity, PrimaryGeneratedColumn, ...