939 questions
1
vote
1
answer
84
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?
2
votes
1
answer
349
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 ...
1
vote
0
answers
85
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....
5
votes
3
answers
556
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
197
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
71
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
287
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 ...
1
vote
1
answer
2k
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 get this error :
ActiveRecord::ConnectionNotEstablished: TLS/SSL error: SSL is required, but the server ...
0
votes
1
answer
131
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
203
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
4k
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
108
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
92
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, ...
0
votes
0
answers
60
views
mysql2 module not found error in next application
I am using mysql2 in my next application. Some times it throws error MODULE not found in ./node_modules/mysql2/lib/connection.js:18:1
it works some time & not always. I tried many things. Still i ...
1
vote
1
answer
114
views
Get fields of updated row in Mysql2
I want to get the image field of the updated row so i can send it to the client, it works when using SELECT but when using UPDATE it only returns some information about the process like affectedRows, ...