14,633 questions
1
vote
3
answers
168
views
How to count the number of matching characters in two strings of the same length?
Is there a way to count the number of matching characters between two strings (of the same length) in MariaDB?
Like if we have "keyboard" and "ekyboard" then the answer should be 6 ...
0
votes
0
answers
54
views
How to fix SSL_CTX_new failed message when starting mariadb [closed]
I am trying to run a podman container on Redhat Linux. When initialising, I get the error:
[ERROR] Failed to setup SSL
[ERROR] SSL error: SSL_CTX_new failed
[ERROR] Aborting
It does this with a known ...
0
votes
2
answers
63
views
MariaDB / QMySqlDriver connection without SSL got 2026 error
My problem:
A MariaDB-Server is running in a LAMPP-Installation
It runs by default without SSL.
A Qt-Application (both 5.15.2 and 6.10.1) with loaded QMARIADB-Driver tried to open a connection to the ...
0
votes
3
answers
103
views
Example .gitlab-ci.yml for Laravel 12 with MariaDB that seeds database before running php artisan test
I'm setting up a GitLab Runner for a Laravel 12 project and I want my CI pipeline to do the following:
Spin up a MariaDB service for the tests
Run php artisan migrate:fresh --seed to seed the ...
-1
votes
2
answers
98
views
How to turn off SSL from the Windows client library mariadb connector-c 3.4.8 win64 [closed]
After installing the SDK mariadb-connector-c-3.4.8-win64.msi, when I try to connect to a server using MariaDB, I get "TLS/SSL error: SSL is required, but the server does not support it".
...
0
votes
0
answers
66
views
AWS RDS MariaDB query surprisingly slow on single value result
I have the following tables:
create table account_transactions
(
id int auto_increment primary key,
account_id int not null,
amount ...
0
votes
1
answer
35
views
MariaDB / XAMPP: "Table '.\mysql\proxies_priv' is marked as crashed and last repair failed" — fixed by manually repairing Aria tables
I ran into an issue where MariaDB in XAMPP refused to start and showed this error:
Table '.\mysql\proxies_priv' is marked as crashed and last (automatic?) repair failed
Fatal error: Can't open and ...
1
vote
1
answer
87
views
Function definition in mariadb 10.11.13 syntax error - typical message for a missing semicolon, but the semicolon is there [closed]
DELIMITER //
CREATE FUNCTION total_cost_for_customer (
custNumber INT
)
RETURNS INT
DETERMINISTIC
READS SQL DATA
BEGIN
DECLARE total INT;
SELECT SUM(unitPrice)
INTO total
FROM ...
2
votes
1
answer
118
views
QSqlQuery in Qt6: in-place vs prepared
First of all, Qt version is 6.10.0, testing on Arch Linux rolling. I think I've found a bug in Qt but maybe it's just my fault.
My program asks MariaDB database for some data and displays it in ...
Advice
0
votes
2
replies
42
views
Remote access to Xampp (mariadb)
I would like to store data remotely in a MariaDB (Xampp) running on Ubuntu. It is running on a totally isolated LAN - no external connection.
I have been looking at various places, but seem to be more ...
1
vote
2
answers
97
views
How do I use a json array to search and extract matched values from a different json array in mariaDB?
Situation
I have two tables. ing_master is a master list of ingredients; pdet is a product table, with an ingredients field formatted as json array.
For each product's ingredient list in pdet, I want ...
3
votes
1
answer
111
views
Cause of and means to avoid "flat BNL join" in mariadb 10.11
I'm trying to help a user in another stackoverflow question and have bumped by head into a strange behaviour.
As I rarely use MariaDB, I'm opening another question to investigate the behaviour,
...
1
vote
4
answers
219
views
Correlated queries without the LATERAL keyword
I am using MariaDB v10.11.15 (a MySQL fork) which does not support the LATERAL keyword, to lookup the countries of 30 IPv4 numbers. I have the following query that retrieves the country when given an ...
Advice
0
votes
6
replies
97
views
Why MariaDB doesn't use newly added index?
MariaDB version is 10.4.34.
The query looks like:
SELECT bet.*
FROM Bet bet
WHERE bet.placed >= '2025-10-29T00:00:00'
AND bet.placed <= '2025-10-29T23:59:59'
AND EXISTS (
SELECT 1 FROM ...
0
votes
2
answers
36
views
mariadb debian-start script giving errors: ERROR 1146 (42S02) at line 1: Table '_cdfd7a1251c20c3e.tabError' doesn't exist
I'm getting a number of these errors printed in the systemd journal when i restart mariadb:
Nov 07 17:56:05 p2 /etc/mysql/debian-start[8427]: --------------
Nov 07 17:56:05 p2 /etc/mysql/debian-start[...
1
vote
0
answers
72
views
Why does fetch performance degrade over time in JBoss with MariaDB and how to properly configure fetch for direct JDBC Connection?
I’m running an application on JBoss 7 connected to a MariaDB database hosted on a separate AWS EC2 instance (c5.9xlarge). The SQL query execution itself is extremely fast (around 57ms), but when ...
3
votes
5
answers
175
views
How to get the number of rows from multiple related tables with one query
I have four tables, one primary and three dependents, let's call them A, B, C and D.
All tables have the column ID, with ID being the primary key for A and the foreign key for B-D.
B-D also have a ...
2
votes
1
answer
76
views
How to wait for replication at mariadb transaction commit?
I have a MariaDB cluster made with Galera and my clients use MaxScale with RW router.
I'm having an issue because the application has something this sequential steps:
Start trx1
Insert new record
...
0
votes
0
answers
96
views
The Laravel project on production continues to give database connection error intermittently
The Laravel project on production continues to show the error below intermittently:
SQLSTATE[HY000] [1130] Host 'localhost' is not allowed to connect to
this MariaDB server (Connection: mysql, SQL: ...
0
votes
0
answers
50
views
Best practice for avoiding cluster lockups in Galera DDL scripts
we have a Galera (wsrep_provider_version 4.23) cluster over 3 MariaDB 11.8.3 nodes. Our application has a number of migration scripts (about 50) that run on startup, via Flyway. At some point in the ...
-4
votes
1
answer
100
views
How do I retrieve the primary key of the updated record?
I have this insert query for my MariaDB 10.6.19 database:
CREATE TABLE manufacturers (
manufacturers_id int(11) NOT NULL AUTO_INCREMENT key,
manufacturers_name varchar(32) unique NOT NULL,
...
4
votes
2
answers
857
views
MariaDB / PDO / PHP 1020 error ("Record has changed since last read in table")
How do I correctly deal with 1020 errors within a transaction in MariaDB?
I recently encounter 1020 "Record has changed since last read in table" errors on code that run without this error ...
1
vote
1
answer
79
views
SQL - Adding Union All on derived table subquery fetches all rows
Attempting to optimize a portion of a query that is joining two related tables, and getting odd results compared to other queries in the project with similar structures. Here is a very simplified ...
0
votes
0
answers
71
views
Connection InteliJ IDEA => (docker) MariaDB:11 not working - access denied
TL;DR
Host: Windows 10 + Idea, Docker Desktop. Container: mariadb:latest.
In-Docker connection (docker exec -it mariadb-container ... working).
Host connection returns:
[28000][1045] (conn=13) Access ...
1
vote
1
answer
117
views
mysql_real_query hangs in multithreaded quickfix app [closed]
We have a simple quickfix app that translates FIX messages into our own internal format and vice versa.
It consists of two threads, one of which is the FIX::Application and FIX::MessageCracker, and ...
0
votes
1
answer
61
views
Laravel: Table name is misspelled in SQL statement [duplicate]
I've already written a web application with Laravel, but I'm not nearly as experienced yet. Therefore, I need to ask for help.
Platform: Laravel 12 Starter Kit LiveWire, PHP 8.2.12
Database: mariadb
...
1
vote
0
answers
57
views
PrestaShop Docker container: ‘Access denied for user’ when connecting to MariaDB, even after volume reset on ARM Mac
I am new to Docker. I am trying to run PrestaShop 1.7.7.2 using Docker Compose on my ARM Mac. The stack includes MariaDB, PrestaShop, and phpMyAdmin. Instead when I access the localhost on the web I ...
1
vote
2
answers
162
views
Mariadb query to find a field change working backwards in a table
I am trying to write some sql code to embed in Qt to find out when it last rained.
Table
CREATE TABLE `weather_data` (
`time` bigint(20) NOT NULL,
`temp_1` float DEFAULT NULL,
`humid_1` float ...
0
votes
2
answers
179
views
How to remove duplicate values that are NOT within a range from a MariaDB table?
I have a MariaDB table like this:
CREATE TABLE metric_value (
id int(10) unsigned NOT NULL AUTO_INCREMENT,
metric_id int(10) unsigned DEFAULT NULL,
value decimal(17,2) unsigned NOT NULL,
...
1
vote
0
answers
136
views
Configure MariaDB DSN using Add-OdbcDsn in PowerShell
I'm trying to configure a MariaDB ODBC DSN automatically in PowerShell
my code so far is this:
$DriverName = (Get-OdbcDriver -Name "MariaDB*" | Where-Object Platform -eq "64-bit")....
0
votes
1
answer
293
views
how to change collation connection and character set in simpler way
I am having a database in MariaDB with Latin1 character set and collation connection as Latin1_general_ci. Now I want to change it to utf8mb and utf8mb_general_ci. And my database is of 650GB.
So, ...
0
votes
1
answer
75
views
How to know the character set use in mysql column row event
I have written a python program to parse mysql binlog. In the Query Event, there is a Q_CHARSET_CODE which indicate what character set is used for the logged query. This indicated that the logged ...
4
votes
2
answers
172
views
Catastrophic query planning, non-use of index in MySQL 8+
I have a legacy Drupal 7 site that is used strictly internally. It's replacement is under active development, but in the meantime it is using Aurora2, MySQL 5.7 compatible and is in very expensive ...
0
votes
2
answers
167
views
MariaDB left join ignores index key - slow performance with large joined table
I have a select with a large joined table. On local, performance is fine, but on my server it takes much longer. Below are the version infos (I just upgraded to MariaDB 11.4 on the server).
If I do an ...
0
votes
2
answers
243
views
Cannot connect to mariadb database from VB.Net app with credentials that work from Python on a different system
I have a couple of databases running under mariadb on a Synology NAS, which are being updated and read without problems using the standard mariadb connector across my local network by Python scripts ...
0
votes
1
answer
385
views
Doctrine migration error: Unknown column 'ccsa.FULL_COLLATION_NAME' in 'on clause' Body:
I am learning Symfony and trying to create a simple API. I have defined two Doctrine entities, GameGenre and Game. Here are their codes:
This is my GameGenre Entity:
<?php
namespace App\Entity;
...
0
votes
1
answer
72
views
Creating procedural code for MariaDB in dbeaver
I'm trying to create a script that contains a procedure and then call that procedure. I've done this at work where we use Oracle, but no matter what I try with mariadb, I get an error. So I copied ...
0
votes
1
answer
150
views
Calling a Javascript async function with async/await when streaming JSON and parsing (Node.js)
I am trying to parse an enormous JSON stream in Javascript using Node.js, which is then stored in mariadb. As part of that, I have a table that will have a small number of rows (~50), but each row ...
0
votes
1
answer
117
views
Can't connect to MariaDB in godot
I'm trying to connect to my local database on godot, and the _connect_to_dv_srvr() function does not return any errors. But once I try to create a connection instance, it returns null!
var db_general: ...
2
votes
3
answers
131
views
join subquery return multiple rows
I have main query:
SELECT mt.media_id, mt.title,
SUM(DISTINCT sht.share) as share_count
FROM $grouped_media_table mt
LEFT JOIN $share_table sht ON sht.media_id = mt.media_id AND sht.title = mt....
1
vote
1
answer
75
views
MariaDb Use Column In primary Query in sub Query
I have a table that has store names, product codes and prices.
I need to pull the minimum price of a product and display a list of the product codes with their minimum price, where it all falls down ...
0
votes
1
answer
111
views
Best practices for caching subsets of time-series data in MariaDB? [closed]
I have a sensor_status table that logs the status of hundreds of sensors every 45 minutes
CREATE TABLE sensor_status (
status_id INT AUTO_INCREMENT PRIMARY KEY,
sensor_id INT NOT NULL,
status ...
3
votes
1
answer
113
views
How do I output the SQL code generated by boost::mysql::with_params()?
I'm using boost::mysql and boost:asio to access a MariaDB database. I'm prototyping a project/task management system. A task has a number of dates associated with it. When attempting to insert a task ...
5
votes
0
answers
224
views
MySql.EntityFrameworkCore: Unable to cast object of type 'System.DBNull' to type 'System.Int64'
I'm trying to build a minimal Api for access to a local MariaDB database and my tech is .NET 9, EF, MySql.EntityFrameworkCore, Migrations (Code First) and MariaDB (XAMPP).
When I try to update ...
3
votes
1
answer
92
views
Quering system versioned table doesn't return results
I have some system_versioned tables. After upgrading to version 11.8.2, I no longer get results when querying without explicit AS OF-syntax.
SELECT
m.*
FROM
mydb.mytable m
doesn't get any ...
0
votes
1
answer
58
views
In Mariadb and Galera cluster, will I get different value of a field in different node?
In Mariadb and Galera cluster, we have 3 nodes. I update a field from 99 to 100 through node 1. If I retrieve the same field through node 2, will I get 99 instead of 100 ?
Because the field is used ...
0
votes
1
answer
115
views
Can I create a consecutive sequence number using MariaDB and Galera Cluster?
I have 3 nodes in the galera cluster. When I get the next value from a sequence, it has gaps between the numbers. e.g. 1,4,7...
I would like to write a function to get a sequence number from a table ...
1
vote
1
answer
100
views
MariaDB returns timestamp with two hours difference
I have a MariaDB running inside a Docker container. There is a table inside a database, that has a column of type TIMESTAMP. I am connecting to the database through my TypeScript application, using ...
0
votes
1
answer
92
views
Running Django tests in parallel on MariaDB, get "No such file or directory: 'mysqldump'"
I have a Django project running locally, with its database as MariaDB 10.6 running in a Docker container. The Django tests work fine, but when I try to run them with a --parallel flag I get an error &...
0
votes
0
answers
49
views
Is Lost Update without certification failure expected in Galera Cluster?
I'm using a multi-node Galera Cluster and encountered the following two scenarios:
Case 1 — Certification Conflict (Deadlock) occurs:
Node B and Node C both start transactions.
Both try to update the ...