/r/mariadb

Photograph via snooOG

MariaDB Server is an open source relational database

/r/mariadb

2,509 Subscribers

0

MaisQuelle 🌽 Optimize your MySQL database configuration with AI

0 Comments
2024/10/31
11:46 UTC

1

Enabling bin logs with Galera

I want to enable bin logs on mariadb server. It is a part of 4 node cluster. I read on the web about ruining galera sync if you enable bin logs. I need bin logs for replication to another server. Can someone tell me if this is possible and how?

1 Comment
2024/10/29
15:54 UTC

1

C# app connecting to Maria DB return "Authentication method 'dialog' is not supported"

I'm trying to connect to MariaDB from c# application. I tried Mysqlconnector and MySql.Data nuget packages. I created simple app base on tutorial:

string connectionString = "Server=xxx;Port=3306;User ID=xxx;Password=xxx;Database=xxx";

using (var connection = new MySqlConnection(connectionString))
{
}

I get exception:

I was trying to debug this package and i found out that this exception is thrown on establishing connection to DB even before credentials are used for authentication.

I found informations about configuration of user on Server but im not owning this MariaDB server.

https://mariadb.com/kb/en/pluggable-authentication-overview/

Also one of my team member was able to create java app and connect with same user without any problems

regards

0 Comments
2024/10/29
11:39 UTC

1

"Segment"? config option in 'Add Node' for cluster in Galera Manager

Does anyone know what the "Segment" option is for in the "Add Node" page for clusters in Galera Manager?

It appears to only accept a value from 0 to 255. Unsure what it does, though, and can't seem to find any pages with info about it.

I'm assuming that maybe it's just a way to organize nodes in Galera Manager, to basically group different nodes that are part of a cluster. For example, one segment for nodes on a specific server, or a segment for nodes in a datacenter, etc. But if that was the case, why limit "Segment" to only 0-255 rather than being more descriptive?

Anyhow, would appreciate if anyone can fill me in on what this "Segment" setting does when adding a node.

Thanks

2 Comments
2024/10/25
02:06 UTC

1

"Node's agent is offline" in Galera Manager dashboard. What does this mean? (All nodes show "SYNCED")

Earlier today I installed my first test Galera Cluster in LXD containers on my laptop. MariaDB 10.11 & Ubuntu 22.04.

In Galera Manager desktop the 3 nodes I made show as "SYNCED." Near the bottom right of the node icons is a red dot on each. When I hover over that with my mouse the text "Node's agent is offline" displays.

I can't seem to figure out what this "Node's agent is offline" (while all nodes are SYNCED) is all about. I've searched the docs, various support channels, forums & via Google. Haven't been able to find anything relevant that explains what this is.

If anyone knows, can you please explain or link me to a page that explains what is going on with "Node's agent is offline" and what needs to be done to correct it?

Thanks

And here's a screenshot of what I'm seeing:

https://preview.redd.it/gv5a5kjf4twd1.png?width=360&format=png&auto=webp&s=63aed0d995471517c37be5ac3d331fe8e60c8dd7

1 Comment
2024/10/25
01:41 UTC

1

ONLY_FULL_GROUP_BY is enabled, but it still lets me run queries without GROUP BY?

I've just noticed that my server allows me to run a query like:

SELECT sku,SUM(qty) FROM stock

without specifying any grouping. It returns one line with the sku the same as from SELECT sku FROM stock LIMIT 1, and with SUM(qty) being a sum of the entire quantity column, as you'd expect.

SELECT @@SQL_MODE returns:

ONLY_FULL_GROUP_BY,STRICT_ALL_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

Am I missing something here?

0 Comments
2024/10/24
10:13 UTC

1

GRANT ALL problem to root in 11.4

I updated 11.1 to 11.4 LTS recently only to find out root has no GRANT permissions. Is this a change in 11.4 and how can I fix this? Tried skip-grant-tables method to na avail.

1 Comment
2024/10/22
09:42 UTC

3

Migration from mysql 8 to MariaDB

Currently in my windows 10 laptop, I have 10gb of data in lots of tables in mysql8. Tables do contain json and virtual columns based on json. In my queries, I use

  • CTE
  • MERGE statements
  • Variables in queries like below
select name,
      @rownum := @rownum + 1 as row_number
from your_table
cross join (select @rownum := 0) r
order by name
  • SELECT to csv and LOAD statement a lot.

I would like to migrate this data to my new desktop containing ssd and use MariaDB instead of mysql.

Questions I got is,

  1. Can i use mysqldump which contains ddl and data to setup straight away with no manipulation

  2. Are the SELECT statements and LOAD statements which were used in mysql compatible with MariaDB or there will be changes to it

  3. Java program basically inserts json data does those INSERT statements need to be changed or INSERT statements are compatible

  4. Do I have to make any changes to the connection string in the applications after this migration.

8 Comments
2024/10/18
06:27 UTC

4

License for commercial use in mariadb distributed with my application

Hello! I am currently developing an application that will run a local database, I have evaluated maridb as an option but what about the license? Can I use it for commercial purposes? (I will sell my application through keys or licenses) I may distribute mariadb to package everything in a single .exe file to create a good user experience and configure security so that the database cannot be edited from some database manager maria db data. Does the GNU license allow me to do all this?

8 Comments
2024/10/11
15:17 UTC

3

Inconsistent GTID in cluster

I have a 10.11.9 Mariadb Galera cluster. We realised today when failing replication over to another host and found that the GTID in two of our nodes is inconsistent. The data is consistent over the cluster so we are stuck with the question, how did this happen? Something incremented the GTID twice on one of the hosts and it happened long enough ago that there is nothing useful in our binlog. Any idea what could have caused this?

5 Comments
2024/10/08
19:43 UTC

1

Error 1180 (HY000) when trying to import dump from MySQL 5.7.29 into 11.5.2-MariaDB, client 15.2, why and how to fix it

ERROR 1180 (HY000) at line 3644: Got error 1 "Operation not permitted" during COMMIT

The line itself it quite long, but nonetheless, that SQL file imports into MySQL 5.7.29 without problem while 11.5.2 MariaDB. What caused it and how to fix it?

The line that fails is one long insert line (details at the bottom) with unicode characters.

I have just seen that on MySQL side, table is defined as follows:

CREATE TABLE `normative_cache` (
  `query` varchar(192) NOT NULL,
  `lat` double DEFAULT NULL,
  `lng` double DEFAULT NULL,
  `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`query`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8

in the dump file it is written the same,

but when imported into MariaDB it is shown as:

CREATE TABLE `normative_cache` (
  `query` varchar(192) NOT NULL,
  `lat` double DEFAULT NULL,
  `lng` double DEFAULT NULL,
  `last_update` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`query`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_uca1400_ai_ci

the insert statement could contain various characters using any language, and the first line that breaks can be downloaded at: https://drive.google.com/file/d/1kquBwsznLLUkIyrF6F5s7Gvt3bYEWtGa/view?usp=sharing

it looks like this (too long for paste, first part here):

INSERT INTO `normative_cache` (`query`, `lat`, `lng`, `last_update`) VALUES (''Afak, Afaq District, Al Qadisiyah, IQ',32.0625,45.2427778,'2024-09-20 19:31:37'),(''Afak, Al Qadisiyah, IQ',32.0625,45.2427778,'2024-09-20 19:31:37'),(''afak, IQ',32.0625,45.2427778,'2024-09-20 18:53:30'),(''afak, Iraq',32.0625,45.2427778,'2024-09-20 18:51:04'),(''afrin, SY',36.51,36.8677778,'2024-09-20 18:53:31'),(''afrin, Syria',36.51,36.8677778,'2024-09-20 18:51:05'),(''Afula, IL',32.6075587,35.2890861,'2024-09-20 19:30:17'),(''Ajlun',32.3325599,35.751742,'2024-09-20 19:27:54'),(''Ajlun, Ajlun, JO',32.3325599,35.751742,'2024-09-20 19:27:54'),(''ajlun, JO',32.3325599,35.751742,'2024-09-20 18:53:30'),(''ajlun, Jordan',32.3325599,35.751742,'2024-09-20 18:51:04'),(''Akko, IL',32.9206,35.1003,'2024-09-20 19:30:06'),(''al'al, JO',32.857514,35.666161,'2024-09-20 18:53:30'),(''al'al, Jordan',32.857514,35.666161,'2024-09-20 18:51:04'),(''ali, Bahrain',26.1519444,50.5255556,'2024-09-20 18:51:04'),(''ali, BH',26.1519444,50.5255556,'2024-09-20 18:53:30'),(''Amman',31.9565783,35.9456951,'2024-09-20 19:23:28'),(''Amman, JO',31.9565783,35.9456951,'2024-09-20 19:23:27'),(''Amran, Omran, YE',15.6620639,43.9341408,'2024-09-20 19:28:52'),(''amran, YE',15.6620639,43.9341408,'2024-09-20 18:53:32'),(''amran, Yemen',15.6620639,43.9341408,'2024-09-20 18:51:06'),(''Amran, `Amran, Omran, YE',15.6620639,43.9341408,'2024-09-20 19:28:52'),(''Anah, Al Anbar, IQ',34.3722222,41.9875,'2024-09-20 19:31:15'),(''Anah, Anah District, Al Anbar, IQ',34.3722222,41.9875,'2024-09-20 19:31:15'),(''anah, IQ',34.3722222,41.9875,'2024-09-20 18:53:30'),(''anah, Iraq',34.3722222,41.9875,'2024-09-20 18:51:04'),(''Anaizah;`Anaiza;`Unaiza;‘Anaiza;‘Unaiza;’Anaizah;Anaizeh;عنيزة;‘Unayzah;`Unayzah',26.0833976,43.9627492,'2024-09-20 19:08:59'),(''Anaizah;`Anaiza;`Unaiza;‘Anaiza;‘Unaiza;’Anaizah;Anaizeh;عنيزة;‘Unayzah;`Unayzah, SA',26.0833976,43.9627492,'2024-09-20 19:08:59'),(''anjarah, JO',32.305309,35.755909,'2024-09-20 18:53:30'),(''anjarah, Jordan',32.305309,35.755909,'2024-09-20 18:51:04'),(''Aqrah, Akre District, Nineveh, IQ',36.7413889,43.8933333,'2024-09-20 19:31:32'),(''aqrah, IQ',36.7413889,43.8933333,'2024-09-20 18:53:30'),(''aqrah, Iraq',36.7413889,43.8933333,'2024-09-20 18:51:04'),(''Aqrah, Nineveh, IQ',36.7413889,43.8933333,'2024-09-20 19:31:32'),(''ataq, YE',14.5363889,46.8330556,'2024-09-20 18:53:32'),(''ataq, Yemen',14.5363889,46.8330556,'2024-09-20 18:51:06'),(''ayn Janna, JO',32.3328519,35.7640707,'2024-09-20 18:53:30'),(''ayn Janna, Jordan',32.3328519,35.7640707,'2024-09-20 18:51:04'),(''ayn-al-'arab, SY',36.5482873,38.4008357,'2024-09-20 18:53:31'),(''ayn-al-'arab, Syria',36.5482873,38.4008357,'2024-09-20 18:51:05'),(''ayy, JO',31.1320639,35.6427431,'2024-09-20 18:53:30'),(''ayy, Jordan',31.1320639,35.6427431,'2024-09-20 18:51:04'),(''Azimabad',25.5940947,85.1375645,'2024-09-20 19:23:14')`
8 Comments
2024/10/07
13:48 UTC

1

RocksDB plugin keeps reinstalling itself and filling up disk space

Hi Folks,

First time poster here so go easy ;)

I recently spun up a wordpress blog on an amazon Linux 2 instance using a local DB on MariaDB version 10.2.38.

I recently discovered that my ec2 instance had run out of disk space and after investigation I noticed that the the culprit was the /var/lib/mysql/#rocksdb directory that was filling up.

This led me on a rabbit hole to find out exactly what MyRocks/RocksDB was, if it was essential for my Wordpress blog to operate and if not how to uninstall it.

After looking at the documentation for MyRocks on the MaridDB KB, I saw that there is an option to uninstall the plugin by using the following command:

UNINSTALL SONAME 'ha_rocksdb';

After running this command I was able to see that the plugin was no longer listed and I then went and manually deleted the contents of the above #rocksdb folder.

However after some time I noticed the same issue in that my disk space was filling up and the plugin has somehow reinstalled (Image attached).

My question is, does anyone know how I can permanently remove this plugin so it does not start filling up my disk space and rendering my blog unreachable?

Is there potentially a wider issue here, in that my instance has been compromised and a malicious bot or something is doing this ?

Any advice would be greatly appreciated and thanks in advance.

1 Comment
2024/10/02
09:25 UTC

0

What's the best way to "copy" a database in MariaDB?

I’m setting up a new database and want to copy over all the tables from another one I already have. I'm stuck on which command to use in MariaDB. Any help?

5 Comments
2024/09/30
13:11 UTC

0

Can't install MariaDB 11 series on RHEL8?

After checking the log after the installation failure, it seems that it requires Linux kernel version 5+.

Then why is there an official RPM for RHEL8?

0 Comments
2024/09/30
11:18 UTC

1

The release date of MariaDB Vector is known?

The production release date of MariaDB Vector is known?

I know there is already an RC version, but it won't even start on Windows.

2 Comments
2024/09/29
06:45 UTC

1

mariadb python package pip install issues

I was trying to install the mariadb package for python to let the script add to a database. however when I try `pip install mariadb` it fails with 'failed to build wheels for mariadb' and gives some sort of gcc error. Any idea how I can resolve this?

0 Comments
2024/09/29
06:36 UTC

3

workbench crashes

wb crashes when connecting to mariadb v10, is this because wb is incompatible, it only lists mysql server v8 on the oracle site?

If so what's an alternative to wb for Ubuntu?

6 Comments
2024/09/23
23:57 UTC

2

How to config CONNECT ENGINE to connect MongoDB

I already install and config CONNECT ENGINE in MariaDB and I using below query to connect to MongoDB from MariaDB

CREATE TABLE `Monitor_Configuration` (
  `_id` char(24) NOT NULL,
  `name` varchar(136) NOT NULL,
  `value` char(13) NOT NULL
) engine=connect table_type=MONGO tabname='student'
data_charset=utf8 connection='mongodb://dev:1234@127.0.0.1:37017/TEST?replicaSet=rs0'

variables my MariaDB

connect_jvm_path = "/usr/lib/jvm/java-11-openjdk-amd64/lib/server";
connect_class_path = "/usr/share/java/mongodb-driver-sync-4.11.1.jar:/usr/share/java/mongodb-jdbc-2.2.0-all.jar:/usr/share/java/mongo-java-driver-3.4.2.jar";

But I got a ERROR:

SQL Error [1296] [HY000]: (conn=3) Got error 174 'ERROR: class wrappers/Mongo3Interface not found!' from CONNECT

how to fix that error. I think my driver to connect MongoDB incorrect. anyone, who can give me a link to get a correct driver?

1 Comment
2024/09/16
07:19 UTC

2

Changes made from another client while connected aren't seen

Does anyone know why if I make a change to my database using dbeaver while my API is connected to the database, the API won't see the change until I restart it?

3 Comments
2024/09/15
00:53 UTC

2

Move Mariadb instance Win PC to Win PC

I only use Mariadb as a backend for multi - Kodi setup, so I can track where I am in TV Shows/Movies on different instances

The database directory is ~300MB

I currently have it on a physical Machine and want to move to a virtual machine :Both running windows (my linux skills aren't the best) and this is a home setup

What's the easiest way to do this (the user of the database will be doing the migration so downtime, is not watching tv time😄)

Can I just copy the data dir between the PCs? Or do I backup and restore? Or is a dump the best way to do this? I've read different options & googling isn't helping with an answer

(Also I installed 11.5 on new PC with 11.4 on old

2 Comments
2024/09/12
19:41 UTC

4

Corrupt index, InnoDB

Hi all,

my MariaDB seems to be corrupt. I use it for Home Assistant.

I tried to dump it and then restore it but it seems the table index are broken.

I tried to find a solution but no success.

Starting in docker with innodb_force_recovery = 1 otherwise it crashes.

This is the output when I want to dump it:

root@183142cde1c2:/#mysqldump --all-databases --force > /config/databases/backup/homeassistantdump.sql

mysqldump: Error 1034: Index for table 'event_data' is corrupt; try to repair it when dumping table `event_data` at row: 2814

mysqldump: Error 1034: Index for table 'events' is corrupt; try to repair it when dumping table `events` at row: 0

mysqldump: Error 1034: Index for table 'state_attributes' is corrupt; try to repair it when dumping table `state_attributes` at row: 4295

mysqldump: Error 1034: Index for table 'states' is corrupt; try to repair it when dumping table `states` at row: 407163

mysqldump: Error 1034: Index for table 'statistics' is corrupt; try to repair it when dumping table `statistics` at row: 108148

mysqldump: Error 1034: Index for table 'statistics_short_term' is corrupt; try to repair it when dumping table `statistics_short_term` at row: 0

How can I rebuild the index? Engine is InnoDB

26 Comments
2024/09/05
06:30 UTC

3

Build Your Own DBaaS with Nutanix Database Service and MariaDB Enterprise Server

This MariaDB-sponsored webinar will take place on Sept 12 at 12 PM CDT. Topics covered will include: spinning up on-demand database instances, MariaDB + NDB architecture, private DBaaS to modernize your application, practical steps involved with DBaaS, etc.

https://go.mariadb.com/Build-your-own-DBaaS-with-Nutanix-MariaDB-2024-09-12_Registration.html

[Note: I'm not associated with this MariaDB webinar in any way, just sharing the information as a fellow professional.]

1 Comment
2024/08/28
05:16 UTC

4

error installing python connector

Building wheels for collected packages: mariadb
  Building wheel for mariadb (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for mariadb (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [51 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-cpython-311
      creating build/lib.linux-x86_64-cpython-311/mariadb
      copying mariadb/__init__.py -> build/lib.linux-x86_64-cpython-311/mariadb
      copying mariadb/connectionpool.py -> build/lib.linux-x86_64-cpython-311/mariadb
      copying mariadb/connections.py -> build/lib.linux-x86_64-cpython-311/mariadb
      creating build/lib.linux-x86_64-cpython-311/mariadb/constants
      copying mariadb/constants/__init__.py -> build/lib.linux-x86_64-cpython-311/mariadb/constants
      copying mariadb/constants/CAPABILITY.py -> build/lib.linux-x86_64-cpython-311/mariadb/constants
      copying mariadb/constants/CLIENT.py -> build/lib.linux-x86_64-cpython-311/mariadb/constants
      copying mariadb/constants/CURSOR.py -> build/lib.linux-x86_64-cpython-311/mariadb/constants
      copying mariadb/constants/ERR.py -> build/lib.linux-x86_64-cpython-311/mariadb/constants
      copying mariadb/constants/FIELD_FLAG.py -> build/lib.linux-x86_64-cpython-311/mariadb/constants
      copying mariadb/constants/FIELD_TYPE.py -> build/lib.linux-x86_64-cpython-311/mariadb/constants
      copying mariadb/constants/EXT_FIELD_TYPE.py -> build/lib.linux-x86_64-cpython-311/mariadb/constants
      copying mariadb/constants/INDICATOR.py -> build/lib.linux-x86_64-cpython-311/mariadb/constants
      copying mariadb/constants/INFO.py -> build/lib.linux-x86_64-cpython-311/mariadb/constants
      copying mariadb/constants/STATUS.py -> build/lib.linux-x86_64-cpython-311/mariadb/constants
      copying mariadb/constants/TPC_STATE.py -> build/lib.linux-x86_64-cpython-311/mariadb/constants
      copying mariadb/cursors.py -> build/lib.linux-x86_64-cpython-311/mariadb
      copying mariadb/dbapi20.py -> build/lib.linux-x86_64-cpython-311/mariadb
      copying mariadb/field.py -> build/lib.linux-x86_64-cpython-311/mariadb
      copying mariadb/release_info.py -> build/lib.linux-x86_64-cpython-311/mariadb
      running build_ext
      building 'mariadb._mariadb' extension
      creating build/temp.linux-x86_64-cpython-311
      creating build/temp.linux-x86_64-cpython-311/mariadb
      gcc -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPY_MARIADB_MAJOR_VERSION=1 -DPY_MARIADB_MINOR_VERSION=1 -DPY_MARIADB_PATCH_VERSION=10 -DPY_MARIADB_PRE_RELEASE_SEGMENT=\"None\" -DPY_MARIADB_PRE_RELEASE_NR=\"0\" -DPY_MARIADB_POST_RELEASE_SEGMENT=\"None\" -DPY_MARIADB_POST_RELEASE_NR=\"0\" -I/usr/include/mysql -I/usr/include/mysql/mysql -I./include -I/home/alec/Programming/rental_property_manager/api/venv/include -I/home/alec/.pyenv/versions/3.11.9/include/python3.11 -c mariadb/mariadb.c -o build/temp.linux-x86_64-cpython-311/mariadb/mariadb.o -DDEFAULT_PLUGINS_SUBDIR=\"/usr/lib64/mariadb/plugin\"
      gcc -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPY_MARIADB_MAJOR_VERSION=1 -DPY_MARIADB_MINOR_VERSION=1 -DPY_MARIADB_PATCH_VERSION=10 -DPY_MARIADB_PRE_RELEASE_SEGMENT=\"None\" -DPY_MARIADB_PRE_RELEASE_NR=\"0\" -DPY_MARIADB_POST_RELEASE_SEGMENT=\"None\" -DPY_MARIADB_POST_RELEASE_NR=\"0\" -I/usr/include/mysql -I/usr/include/mysql/mysql -I./include -I/home/alec/Programming/rental_property_manager/api/venv/include -I/home/alec/.pyenv/versions/3.11.9/include/python3.11 -c mariadb/mariadb_codecs.c -o build/temp.linux-x86_64-cpython-311/mariadb/mariadb_codecs.o -DDEFAULT_PLUGINS_SUBDIR=\"/usr/lib64/mariadb/plugin\"
      gcc -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPY_MARIADB_MAJOR_VERSION=1 -DPY_MARIADB_MINOR_VERSION=1 -DPY_MARIADB_PATCH_VERSION=10 -DPY_MARIADB_PRE_RELEASE_SEGMENT=\"None\" -DPY_MARIADB_PRE_RELEASE_NR=\"0\" -DPY_MARIADB_POST_RELEASE_SEGMENT=\"None\" -DPY_MARIADB_POST_RELEASE_NR=\"0\" -I/usr/include/mysql -I/usr/include/mysql/mysql -I./include -I/home/alec/Programming/rental_property_manager/api/venv/include -I/home/alec/.pyenv/versions/3.11.9/include/python3.11 -c mariadb/mariadb_connection.c -o build/temp.linux-x86_64-cpython-311/mariadb/mariadb_connection.o -DDEFAULT_PLUGINS_SUBDIR=\"/usr/lib64/mariadb/plugin\"
      mariadb/mariadb_connection.c: In function ‘MrdbConnection_escape_string’:
      mariadb/mariadb_connection.c:821:15: warning: unused variable ‘string’ [-Wunused-variable]
        821 |     PyObject *string= NULL,
            |               ^~~~~~
      gcc -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPY_MARIADB_MAJOR_VERSION=1 -DPY_MARIADB_MINOR_VERSION=1 -DPY_MARIADB_PATCH_VERSION=10 -DPY_MARIADB_PRE_RELEASE_SEGMENT=\"None\" -DPY_MARIADB_PRE_RELEASE_NR=\"0\" -DPY_MARIADB_POST_RELEASE_SEGMENT=\"None\" -DPY_MARIADB_POST_RELEASE_NR=\"0\" -I/usr/include/mysql -I/usr/include/mysql/mysql -I./include -I/home/alec/Programming/rental_property_manager/api/venv/include -I/home/alec/.pyenv/versions/3.11.9/include/python3.11 -c mariadb/mariadb_cursor.c -o build/temp.linux-x86_64-cpython-311/mariadb/mariadb_cursor.o -DDEFAULT_PLUGINS_SUBDIR=\"/usr/lib64/mariadb/plugin\"
      mariadb/mariadb_cursor.c: In function ‘MrdbCursor_execute_text’:
      mariadb/mariadb_cursor.c:1138:39: error: passing argument 2 of ‘PyBytes_AsStringAndSize’ from incompatible pointer type [-Wincompatible-pointer-types]
       1138 |         PyBytes_AsStringAndSize(stmt, &statement, (Py_ssize_t *)&statement_len);
            |                                       ^~~~~~~~~~
            |                                       |
            |                                       const char **
      In file included from /home/alec/.pyenv/versions/3.11.9/include/python3.11/Python.h:50,
                       from ./include/mariadb_python.h:21,
                       from mariadb/mariadb_cursor.c:20:
      /home/alec/.pyenv/versions/3.11.9/include/python3.11/bytesobject.h:56:12: note: expected ‘char **’ but argument is of type ‘const char **’
         56 |     char **s,           /* pointer to buffer variable */
            |     ~~~~~~~^
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for mariadb
Failed to build mariadb
ERROR: Could not build wheels for mariadb, which is required to install pyproject.toml-based projects
2 Comments
2024/08/22
23:52 UTC

2

MariaDB 11 bug with temporary tables?

Hi everyone,
something changed with temporary tables that causes an error I can't explain.
Test:

CREATE TABLE thetable(id int(11) NOT NULL, PRIMARY KEY("id"));
INSERT INTO thetable(id) VALUES (1),(2),(3);

DELIMITER $
CREATE PROCEDURE TestProc()
begin
create or replace temporary table temp engine=memory select id from thetable;
for q in (select id from temp) do
 set @log=concat(@log,q.id,'|');
end for;
end$
CREATE PROCEDURE TestProc2()
begin
set @log='';
call TestProc;
call TestProc;
end$
DELIMITER ;

If you call TestProc2()
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 '' at line 1 (1064)
If you call TestProc twice at once, it will not give an error, but only the first one will run.

In MariaDB 10 it will run fine, the log variable will contain 1|2|3|1|2|3| in every case.
Why is this happening? I have a project with lots of temporary tables in procedures and everything is broke now :(

0 Comments
2024/08/22
10:37 UTC

3

MySQL 8.0 Primary/Secondary -> MariaDB Galera migration

Hi all,

in my company we're using currently a MySQL 8.0 Primary->Secondary synchronisation without geo-replication. The current state warrants to re-think from scratch. The Database is roughly 1.8TB big.

I had been deploying Galera in my previous company as a geo-replicated setup and had been in love with it. I did the switch from MariaDB 10.x Primary->Secondary there to Galera, but the DB was only a couple GB big. Migration was just done with mysqldump, re-import and connection detail update in the app during maintenance.

I never set up any MySQL Primary->Secondary setups myself before.

I found this blog post and want to use it as a rough shape for live migration: https://developer.epages.com/blog/tech-stories/how-to-migrate-data-into-a-galera-cluster/

Thanks in advance!

5 Comments
2024/08/22
05:23 UTC

1

How to enable sql query logging

I've looked up online how to enable logging of all commands ran against the database. But none have given me that. Does anyone know the trick here? I have:

mysql Ver 15.1 Distrib 10.3.39-MariaDB

4 Comments
2024/08/21
20:19 UTC

Back To Top