14,638 questions
2
votes
5
answers
109
views
How to get the number of rows from multiple related tables with one query
Sorry if this has been asked before, but I'm a little stumped here.
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 ...
-2
votes
0
answers
40
views
MariaDB Slave replication just for backup [closed]
I have a MariaDB Galera master-master replication with 2 nodes.
I would like to know if it is a good idea / best practice to add a third slave node just to run periodical dump.
Currently dumps are ...
-2
votes
0
answers
86
views
MariaDB Replication problem between 10.6.19 and 10.11.10 [closed]
I actually have a problem with MariaDB replication between a master which has MariaDB version 10.6.19 and a slave which has MariaDB version 10.11.10.
When I make a show slave status \G under my slave, ...
1
vote
1
answer
46
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
81
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
30
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
86
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,
...
-2
votes
1
answer
109
views
Update by comparing data in 2 tables [duplicate]
I have two tables in my database: wp_posts and wp_postmeta.
I want to retrieve the "meta_value" value of a column in wp_postmeta based on the "meta_key" data. So I want to get the &...
3
votes
2
answers
318
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
71
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
62
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
107
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
59
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
50
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
160
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 ...