mariadb from Debian 12 (bookworm)

V2 error reports
dl3hm
New user
Posts: 2
Joined: 08 Aug 2023, 07:57

mariadb from Debian 12 (bookworm)

Post by dl3hm »

I have used mariadb from Debian-stable togehter with Log4OM(2) since years without problems. With the update to Debian 12 (bookworm) it does not work any longer.

The problem has something to do with an incompatibility between newer versions of mariadb and original MySQL software used by Log4OM2:

https://stackoverflow.com/questions/740 ... ast-from-d

The solution suggested in the following link does not work for me:
https://forum.log4om.com/viewtopic.php?f=31&t=6991

A further relatet link without solution:
https://forum.log4om.com/viewtopic.php?p=43835

What worked for me, was to install the original MySQL-Docker image in parallel to the existing mariadb:

https://hub.docker.com/r/mysql/mysql-server/

I have used the additional info from here:

https://geshan.com.np/blog/2022/02/mysq ... r-compose/

Docker was installed using the following guide:

https://docs.docker.com/engine/install/ ... repository

Since this procedure is very complex it would be highly appreciated if Log4OM2 would be modified in a way that it works with a current version of mariadb. Probably a change from MySql.Data.MySqlClient to MySqlConnector has to be done, as suggested by the first link above.

73 Harald, DL3HM
User avatar
SP2L
Advanced Class
Posts: 55
Joined: 29 Aug 2019, 13:33
Location: Tczew, Poland
Contact:

Re: mariadb from Debian 12 (bookworm)

Post by SP2L »

Greetings.

I came across exactly the same problem like Harald when trying to use
for Log4OMv2 MariaDB 10.11.6 on Debian Bookworm 12.5 running on RPi4B.
The answer from remote MariaDB server is always "Database seems not valid".
Been searching Internet for any usable solution, to no avail so far.

MariaDB on Bullseye uses utf8_general_ci collation
whereas MariaDB on Bookworm uses utf8mb3_general_ci collation.
The latter do not offer at all utf8_general_ci collation.
Most probably this is the culprit, Hi!

Database-seems-not-valid.jpg
Database-seems-not-valid.jpg (10.62 KiB) Viewed 12323 times

Need to mention that MariaDB (and all databases) on Debian 12.5 Bookworm
are perfectly manageable from any machine on LAN by means of PHPMyAdmin via web browser.

Changing MariaDB to MySQL is NOT an option for me!


Any thougts/suggestions, please?
Best regards.
Tom - SP2L
https://www.sp2l.eu
va7gp
Novice Class
Posts: 6
Joined: 28 May 2022, 13:44

Re: mariadb from Debian 12 (bookworm)

Post by va7gp »

I just upgraded today, from Debian 10 to Debian 12.5 (bookworm). I too cannot access my Log4OM database :o :(
Log4OM version 2.32.1.0 (latest stable)

On my remote server, I can see Log4OM connecting / contacting the server:

Code: Select all

240531 14:08:37	    31 Connect	[email protected] on log4om using TCP/IP
		    31 Query	SELECT @@max_allowed_packet, @@character_set_client, 
        @@character_set_connection, @@license, @@sql_mode, @@lower_case_table_names, @@autocommit
240531 14:11:12	    32 Connect	[email protected] on log4om using TCP/IP
		    32 Query	SELECT @@max_allowed_packet, @@character_set_client, 
        @@character_set_connection, @@license, @@sql_mode, @@lower_case_table_names, @@autocommit
		    32 Query	SELECT TIMEDIFF(NOW(), UTC_TIMESTAMP())
		    32 Query	SHOW COLLATION
		    32 Quit	
But Log4OM doesn't comprehend what is returned, and gives "Database seems not valid". Like Original Poster and succeeding ...
Can this be addressed?
Last edited by va7gp on 31 May 2024, 22:04, edited 2 times in total.
va7gp
Novice Class
Posts: 6
Joined: 28 May 2022, 13:44

Re: mariadb from Debian 12 (bookworm)

Post by va7gp »

To be thorough, I set up Debian 11 to check if this intermediate step (for me, in my upgrade path) would work.... It Does NOT. Debian 11 produces the same result as Debian 12: "Database seems not valid"

Debian 10 shows, in response to

Code: Select all

MariaDB [log4om]> show collation like 'utf8%';
(selected relevant extracts)

Code: Select all

+------------------------------+---------+------+---------+----------+---------+
| Collation                    | Charset | Id   | Default | Compiled | Sortlen |
+------------------------------+---------+------+---------+----------+---------+
| utf8_general_ci              | utf8    |   33 | Yes     | Yes      |       1 |
| utf8_bin                     | utf8    |   83 |         | Yes      |       1 |
| utf8mb4_general_ci           | utf8mb4 |   45 | Yes     | Yes      |       1 |
| utf8mb4_bin                  | utf8mb4 |   46 |         | Yes      |       1 |
WHEREAS Debian 12.5 shows only:

Code: Select all

+--------------------------------+---------+------+---------+----------+---------+
| Collation                      | Charset | Id   | Default | Compiled | Sortlen |
+--------------------------------+---------+------+---------+----------+---------+
| utf8mb3_general_ci             | utf8mb3 |   33 | Yes     | Yes      |       1 |
| utf8mb3_bin                    | utf8mb3 |   83 |         | Yes      |       1 |
ak7vv
Novice Class
Posts: 17
Joined: 13 Nov 2023, 07:50
Location: Redmond, WA, USA
Contact:

Re: mariadb from Debian 12 (bookworm)

Post by ak7vv »

The database client in Log4OM2 needs to be updated, as was discussed in another thread on the topic. Until that's done, you're stuck with older version of MariaDB/MySQL. This was supposed to happen in the next build but I haven't seen a change. I run a different version (10.6) of MariaDB just for Log4OM2 for just that reason.
User avatar
SP2L
Advanced Class
Posts: 55
Joined: 29 Aug 2019, 13:33
Location: Tczew, Poland
Contact:

Re: mariadb from Debian 12 (bookworm)

Post by SP2L »

Greetings.

I do have Ver 15.1 Distrib 10.5.26-MariaDB happily and 24x7(!) running on Debian 11.11
for many months without __ANY__ (even smallest) issue,
hosted by RPi4B server with 2GB RAM, Hi!
Best regards.
Tom - SP2L
https://www.sp2l.eu
User avatar
SP2L
Advanced Class
Posts: 55
Joined: 29 Aug 2019, 13:33
Location: Tczew, Poland
Contact:

Re: mariadb from Debian 12 (bookworm)

Post by SP2L »

Greetings.


It seems that for one reason or another, fairly quick upgrade of Log4OMv2 database
- to comply with Debian Bookworm OS - is not going to happen...

Devoted quite a lot of time to find working solution and finally managed it, Hi!!!

I spare most of my work and testing. Will describe only necessary and important steps.
All in all, performed many time consuming tasks.

Environment I worked with:
- desktop PC - W10 22H2 with running Log4OM 2 v2.33.0.0
- RPi400, Debian 12.7, mariadb Ver 15.1 Distrib 10.5.26-MariaDB
(YES! I intentionally uninstalled original 10.11.6 and installed above!)

Whole process I tried to describe in a manner that even layman should understand, Hi!
This "recipe" pertains __ONLY__ to RaspberryPi OS'es!

Download from
https://www.raspberrypi.com/software/operating-systems/
"Raspberry Pi OS with desktop and recommended software"
file: 2024-10-22-raspios-bookworm-arm64-full.img.xz
(or any other of one's choice!) and etch it on SD card.

Once Debian 12.7 starts as expected we can proceed further.

Uninstal manually or by means of Synaptic, files similar
to listed few lines below but belonging to MariaDB-10.11.6 set
(or any others higher than 10.5.26).

Double/triple check that files related to MariaDB-10.11.6
were removed/purged from the working system!

As Raspberry Pi OS 12 bookworm local apt packages archive
doesn't include older versions of packages related to mariadb-10.5.26
download needed single files from this website:

http://archive.raspbian.org/raspbian/po ... iadb-10.5/

Alternatively from

https://dlm.mariadb.com/browse/mariadb_ ... 26/?flat=1

download file named mariadb-10.5.26-debian-bullseye-arm64-debs.tar
which contains all files related to MariaDB 10.5.26

Only folowing *.deb files are needed:

galera-4_26.4.19-deb11_arm64.deb
libmariadb3_10.5.26+maria~deb11_arm64.deb
mariadb-backup_10.5.26+maria~deb11_arm64.deb
mariadb-client-10.5_10.5.26+maria~deb11_arm64.deb
mariadb-client-core-10.5_10.5.26+maria~deb11_arm64.deb
mariadb-client_10.5.26+maria~deb11_all.deb
mariadb-common_10.5.26+maria~deb11_all.deb
mariadb-server-10.5_10.5.26+maria~deb11_arm64.deb
mariadb-server-core-10.5_10.5.26+maria~deb11_arm64.deb
mariadb-server_10.5.26+maria~deb11_all.deb
mysql-common_10.5.26+maria~deb11_all.deb

Put these files in any empy directory of your choice.

In terminal window issue command:
cd /path/to/directory/of/your/choice
Then issue next command:
dpkg --force-depends -i ./*
This will install our packages in necessary order
insuring required dependencies.

After installation completes, RPi OS will attempt to start MariaDB.
To see if it works, in terminal window issue:
systemctl status mariadb
Output similar to this below means that everything went O.K!:

Quote
● mariadb.service - MariaDB 10.5.26 database server
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2024-11-05 08:34:14 CET; 1 day 6h ago
Docs: man:mariadbd(8)
https://mariadb.com/kb/en/library/systemd/
Process: 598 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCES>
Process: 621 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCE>
Process: 625 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= || VAR=`/usr/bin/galera_recovery`;>
Process: 749 ExecStartPost=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCC>
Process: 752 ExecStartPost=/etc/mysql/debian-start (code=exited, status=0/SUCCESS)
Main PID: 709 (mariadbd)
Status: "Taking your SQL requests now..."
Tasks: 11 (limit: 10550)
CPU: 9min 4.337s
CGroup: /system.slice/mariadb.service
└─709 /usr/sbin/mariadbd

Nov 05 08:34:09 rpi4b systemd[1]: Starting MariaDB 10.5.26 database server...
Nov 05 08:34:10 rpi4b mariadbd[709]: 2024-11-05 8:34:10 0 [ERROR] feedback plugin: failed to retrieve the MAC address
Nov 05 08:34:14 rpi4b systemd[1]: Started MariaDB 10.5.26 database server.
Nov 05 08:34:14 rpi4b /etc/mysql/debian-start[758]: Looking for 'mariadb' as: /usr/bin/mariadb
Nov 05 08:34:14 rpi4b /etc/mysql/debian-start[758]: Looking for 'mariadb-check' as: /usr/bin/mariadb-check
Nov 05 08:34:14 rpi4b /etc/mysql/debian-start[758]: This installation of MariaDB is already upgraded to 10.5.26-MariaDB.
Nov 05 08:34:14 rpi4b /etc/mysql/debian-start[758]: There is no need to run mysql_upgrade again for 10.5.26-MariaDB.
Nov 05 08:34:14 rpi4b /etc/mysql/debian-start[758]: You can use --force if you still want to run mysql_upgrade
Nov 05 08:34:14 rpi4b /etc/mysql/debian-start[766]: Checking for insecure root accounts.

Unquote


If MariaDB doesn't start automatically & properly,
it's time to configure MariaDB server & client.

Please note that pop-up window with message "Database seems not valid"
appears also in very trivial situations, like for instance
lack of connection to computer running MariaDB server, Hi!!!

I strongly suggest usage of Synaptic package manager
as it simplifies many important tasks to be performed,
like for instance locking "our" newly installed packages
from being mistakenly or accidentally upgraded!!!

Hovever this can be done also directly from terminal window
but requires knowledge on syntax of commands to be used.

See here:
https://askubuntu.com/questions/18654/h ... ic-package
and there
https://www.tecmint.com/disable-lock-bl ... debian-apt

Last but not least, I also strongly suggest to install
and fire up automatic system and/or single directories backups
which in case of SD cards I consider it almost "the must"!
Best regards.
Tom - SP2L
https://www.sp2l.eu
User avatar
IW3HMH
Site Admin
Posts: 2988
Joined: 21 Jan 2013, 14:20
Location: Quarto d'Altino - Venezia (ITA)
Contact:

Re: mariadb from Debian 12 (bookworm)

Post by IW3HMH »

Log4OM 2.34 released yesterday adds support to MariaDB
Daniele Pistollato - IW3HMH
User avatar
SP2L
Advanced Class
Posts: 55
Joined: 29 Aug 2019, 13:33
Location: Tczew, Poland
Contact:

Re: mariadb from Debian 12 (bookworm)

Post by SP2L »

Hello Daniele.

While ago installed Log4OM2 v2.34.0.0
PRi400 Debian 12.8 with MariaDB-10.11.6

When checking connection to log4om2 database from Log4OM2 v2.34.0.0 on W10 22H2
I still see message "Database seems not valid.", ufortunately...

Ascertained that I do have .NET4.8 installed!
Best regards.
Tom - SP2L
https://www.sp2l.eu
User avatar
SP2L
Advanced Class
Posts: 55
Joined: 29 Aug 2019, 13:33
Location: Tczew, Poland
Contact:

Re: mariadb from Debian 12 (bookworm)

Post by SP2L »

Hello Daniele et al.

IW3HMH wrote: 10 Nov 2024, 16:37 Log4OM 2.34 released yesterday adds support to MariaDB
I confirm that Log4OM2 v2.34.0.0 works perfectly O.K.
with MariaDB 10.11.6 and higher on Debian Bookworm 12.8
running on my RPi4B, RPi400 and desktop PC.
Best regards.
Tom - SP2L
https://www.sp2l.eu
Post Reply