Questions tagged [mariadb]
MariaDB is an open source database server that offers drop-in replacement functionality for MySQL.
12,252
questions
-1
votes
1
answer
13
views
MyISAM vs InnoDB MariaDB for lots of read operations
I have read for years that MyISAM was the preferred DB engine for MySQL/MariaDB when you have a lots of read operations vs lots of insert/update/deletes. I have stuck with MyISAM for tables that are ...
0
votes
0
answers
8
views
Node MariaDB stuck on getConnection
I'm running mariadb locally and want to query for a few rows using the Node driver.
I have the following code below that comes straight from the mariadb node docs. I've confirmed my server is up and ...
0
votes
1
answer
26
views
Docker compose: getaddrinfo for mariadb failed
I'm quite bad at creating docker-compose and I currently have a problem when I try to build a new project.
After the build I can't access my mariadb server within my php app container, I've got this ...
0
votes
0
answers
8
views
MariaDB insert error in PHP7 since upgrade from CentOS7 to Oracle Linux Server 8.6 [duplicate]
I'm getting the "You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'long, ul_lat, ul_long, lr_lat, lr_long, ...
0
votes
0
answers
12
views
Why mysql_secure_installation isn't working?
I tried to find answers but none of them is working. I installed mariadb on centos7 Linux. Then I try to run mysql_secure_installation and received error: command not found. The problem is that I ...
0
votes
0
answers
13
views
MariaDB Python database always returns empty [duplicate]
Trying to learn some simple python/mariadb integration, and ran this script to add test values into a test database....
import mysql.connector as mariadb
mariadb_connection = mariadb.connect(user='...
0
votes
0
answers
15
views
Getting slow query. What column should I index and what type of index?
I'm new to MySQL. I'm getting this slow query below.
# Query_time: 3.357236 Lock_time: 0.000054 Rows_sent: 1 Rows_examined: 107494
# Rows_affected: 0 Bytes_sent: 67
SET timestamp=1652612113;
...
0
votes
3
answers
26
views
SQL insert modified value from one field to a new one
my problem here is that I've got no idea of SQL queries but need to do something I'm assuming should not be hard. I've tried some of the recommended questions but I just can't really understand how to ...
1
vote
1
answer
24
views
select more than 1000 records using gorm preload, it returns null
I would like to select data using gorm preload.
But, gorm returns null if the preload record exceeds 1000.
Is there a limit on the number of data?
Is there anyone who know the answer?
My colleagues in ...
0
votes
0
answers
14
views
While using trigger on MariaDB: check the manual that corresponds to your MariaDB server version
The error that I get is on the following: "You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'DELIMITER $$ ...
0
votes
0
answers
14
views
How to group values by specific columns using join in MySQL?
I have a table from where I extract some values and join them with another select from the same table.
Separately we'd have first the sum of qt_votes:
SELECT SUM(qt_votes) AS tt_votes
FROM table
WHERE ...
0
votes
0
answers
11
views
Are mariadb-install-db and mariadb-secure-installation necessary for each project?
I want to use MariaDB/MySQL local server with PHP on my computer for developing a web app.
I use Manjaro Linux, already installed mysql/mariadb and necessary other packages (via pacman).
Every time ...
1
vote
0
answers
9
views
ROCKSDB Failed to acquire lock due to rocksdb_max_row_locks limit
Version: 10.4.8-MariaDB
engine: ROCKSDB
I have a table labor with 40 Mio rows and a table map with 200,000 rows and I wanted to update some columns of labor with. Since I got performance problems as ...
-2
votes
0
answers
17
views
MariaDB MySQL cannot query a specific column though it contains data [closed]
MariaDB version: Server version: 10.5.15-MariaDB-0+deb11u1 Debian 11
How do I diagnose or repair this table? I can see the data in the column if I do something like SELECT * FROM my_table, but if I ...
1
vote
1
answer
21
views
Spring Boot + Flyway + Testcontainers(mariaDB): Table "xxxx" doesn't exist
I use Testcontainers with mariaDB database in a Spring Boot project for unit testing. I recently upgraded Spring Boot from 2.4.4 to 2.6.6 and found out that the unit test started to fail. The ...
1
vote
0
answers
13
views
How to find all relation of a user in a SQL database?
I want to find all tables pointing to a specific user in a SQL database.
Consider table users with one column id as primary.
How would I find all tables that have reference to a specific user with ...
-2
votes
1
answer
25
views
SQL Query Optimization (NOT IN Clause) Multible tables
Hello Community!
is there a way to optimize this SQL Query so that it is faster? For Example:
Pseudo:
[...] NOT IN (table1, table2, table3, ...)
The Query in question:
SELECT data FROM _ WHERE p_=:e
...
1
vote
1
answer
18
views
Trying to push changes from STAGING site to LIVE site (both WordPress) but I'm trying to figure out which database items to choose from
I've cloned the existing www.DOMAINHERE.com to a staging site staging.DOMAINHERE.com and made changes to the staging site such as its theme, its templates, its template parts, its blocks (added ...
0
votes
1
answer
19
views
NewRelic not capturing database queries
NewRelic not capturing database queries. Other queries are ok, that is a signal that the agent is running and everything is ok.
However, I can not see the database queries on the explorer, I just have ...
-2
votes
1
answer
60
views
Left join Without Subqueries
I am getting the below output, I want the same out but without subqueries.I am looking to refine the below query by removing the subquery as it is affecting the performance of the application. Could ...
-1
votes
0
answers
6
views
Save and query data of viewers of live streams (TSDB?)
I am working on a backend service to save data of a live streaming services viewership to make it queryable for later analytics and live viewer counts.
Every edge server delivers the current connected ...
0
votes
1
answer
30
views
get all keys from json column and convert to rows
I have a table like the following, where cities is a JSON column
ID
cities
1
["madrid"]
2
["london", "madrid", "paris"]
3
["london", "paris&...
0
votes
1
answer
24
views
How does one INSERT from SELECT a JSON into MySQL/MariaDB?
[edit].
It is working. Seems like I was swinging between json_value & json_extract for extraction, and query caching was showing me wrong results. It is surely working with json_extract. Dropping ...
-1
votes
0
answers
35
views
When using gorm preload, if there are more than 1000 where in
When using preload in gorm, it works with where in, but if it is received by in, there is a phenomenon that it is not received if it exceeds 1000 pieces. Is there any other way around this? MariaDB is ...
-1
votes
2
answers
39
views
Sql query find all rows where value is null but another row wih same value not null (Mariadb)
id_product|pn|ean13|supplier|
-----------------------------
1 |1F46G| FGH45642346|1|
2 |8BBBB| null |1|
3 |1F46G| null |2|
4 |1F46G| FGH45642346 |3|
Hello I have table structure like this (just more ...
0
votes
1
answer
24
views
Accented and unaccented letters are equal in MariaDB
I have a table in a MariaDB database, which contains words of any language. The problem is that, for example, 'a' == 'á' is considered true.
MariaDB [(none)]> select 'a' = 'á';
+------------+
| 'a'...
0
votes
0
answers
20
views
I am not being able to connect to my MariaDB remotely
So I have a MariaDB running on my Raspberry and I have created some Android apps that read/write data to that database.
Yesterday the apps were not able to connect to the database, so I tried to:
...
0
votes
1
answer
26
views
Set user to require SSL in mariaDB does not force connection to use certificate
My localhost is running MariaDB 10.6.7 on Win64.
I am trying to force SSL when connecting to MariaDB.
I test the connection using MySQL Workbench 8.0.
To enable the SSL, I did the following:
I ...
0
votes
1
answer
40
views
It keeps outputing error: Not all parameters were used in the SQL statement
def getLevels(userName, levelID, levelName, levelLength, coins, starStars, amognus):
try:
statement = "SELECT userName, levelID, levelName, levelLength, coins, starStars, amognus FROM levels ...
-1
votes
0
answers
17
views
Where is C:\xampp\mysql\backup\ equivalent in MySQL on Linux?
I read this post and I wish to fix it the same way as the answers but I can't find the backup folder in my CentOS. Where is C:\xampp\mysql\backup\ located in Linux?
1
vote
1
answer
16
views
Crafting a Subquery-able UNION ALL based on the results of a query
Data
I have a couple of tables like so:
CREATE TABLE cycles (
`cycle` varchar(6) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`cycle_type` varchar(140) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`...
1
vote
1
answer
27
views
Avoid incrementing primary key if insert is not successful?
I have a 'locations' table as follows:
Using an API, if I send a valid record, the table will start normally with index 1. If I send something that won't be accepted because of the table's ...
0
votes
0
answers
10
views
MariaDB DECLARE ... HANDLER causes a syntax error [duplicate]
I'm trying to create a stored procedure in MariaDB using this code:
DROP PROCEDURE IF EXISTS test;
DELIMITER //
CREATE PROCEDURE test1()
BEGIN
START TRANSACTION;
DECLARE EXIT HANDLER FOR ...
0
votes
0
answers
15
views
How Insert a Ordernumber in Maria DB Column [duplicate]
a | b | x
_________
1 | 1 | 1
1 | 3 | 2
1 | 6 | 3
2 | 1 | 1
2 | 2 | 2
2 | 7 | 3
5 | 2 | 1
5 | 9 | 2
I would like to insert a numbering in column X. So that it looks like shown above. I would like to ...
0
votes
0
answers
25
views
Error when I adding FULLTEXT INDEX "SQL Error (1062): Duplicate entry '' for key '*UNKNOWN*'"
I have specific error when I'd like to add FULLTEXT INDEX to column street. My code is below.
ALTER TABLE offer_private_14 ADD FULLTEXT INDEX idx_street (street);
Error is:
"SQL Error (1062): ...
2
votes
1
answer
36
views
SQLAlchemy: JOIN between different databases AND using different files in a module
Stack
I am using:
Python 3.10.x
FastAPI 0.75.x
SQLAlchemy 1.4.3x
Summary
I am building a unifying FastAPI project for several legacy databases (stored back-end on MariaDB 10.3 - structure has to be ...
0
votes
1
answer
38
views
Getting slow query from SELECT COUNT(*) on WordPress
I have the query below and it gives me a count of 32,000.
SELECT COUNT(*)
FROM wp_term_relationships, wp_posts
WHERE wp_posts.ID = wp_term_relationships.object_id
AND post_status IN (...
1
vote
2
answers
51
views
get the most common value for each column
I'm attempting to create an SQL query that retrieves the total_cost for every row in a table. Alongside that, I also need to collect the most dominant value for both columnA and columnB, with their ...
0
votes
1
answer
16
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,
...
0
votes
0
answers
30
views
how can I achieve faster mariadb inserts
I am dealing with a bit over 15 billion rows of data in various text files. I am trying to insert them into MariaDB using golang. Golang is a fast language and is often used for big data but I cannot ...
1
vote
1
answer
10
views
Trigger to insert row into another table if deleted
I'm trying to create a trigger that will duplicate the ONE row that was deleted to another table. So far, I have just duplicated the whole first table into the second one when I deleted one row, not ...
0
votes
0
answers
13
views
How to migrate data joined from multiple tables in mariadb to elasticsearch
I understand that logstash can be used for migrating data from mariadb to elastic search. The examples I see on the internet are considering one-to-one mapping between mariadb table and elastic search ...
0
votes
1
answer
33
views
MySql mariaDB CREATE FUNCTION DELIMITER doesnt work. has error near ''
im going insane. i dont know whats wrong with this code i see nothing wrong in it. but it kept reading thee same error each time i put the $$ after the "END". please help guys...
here is my ...
0
votes
0
answers
10
views
Retrieving data from mariadb to cloud firestore
I want to do the do the following in flutterflow
when user registers and login, he requests for company details. company details should be retrieved from mariadb database, if the user has company ...
-1
votes
0
answers
25
views
Add a number to the result of REGEXP_REPLACE [duplicate]
I want to update every number of a column incremented by 123.
Example:
'1000 foxes drove in the 44 street and fed the 300 lions'
into:
'1123 foxes drove in the 167 street and fed the 423 lions'
I ...
0
votes
2
answers
46
views
Optimize SQL query using `COUNT`
I have the SQL query (I am using MariaDB/MySQL) below which works fine. But I am wondering if I can simplify/optimize it. The difficulty I am facing is because of COUNT with INNER JOIN. Do I really ...
0
votes
0
answers
27
views
Centos Apache mariadb connection not working [closed]
I have an AWS CentOS VM with Apache and Maria DB. I wrote a simple php file and it opens fine in browser. Next, I added code to connect to Maria DB. On linux command line, if I run 'php test.php' then ...
1
vote
0
answers
20
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 ...
0
votes
0
answers
23
views
MySQL get top 3 rows in for each group of results [duplicate]
This is a similar question to this question, but differs slightly.
In the simplest way possible, I have a table that comprises of the following data:
| id | post_id | time_stamp |
|----|-----...
1
vote
2
answers
47
views
SQL match cols by JSON on other table
In my SQL database, I have a table with type JSON column with a JSON string containing IDs for another table. I want to return matching rows from that other table.
Given that clubhouse.id=55...
SELECT ...