Ubuntu 24.04 LTS demands mysql instead of mariadb

3 posts / 0 new
Last post
do2hg
Ubuntu 24.04 LTS demands mysql instead of mariadb

Hi folks,
... being not so deep into the system mechanics, I am facing the following problem with my upgrade from Ubuntu 22.04 LTS to 24.04 LTS:

When installing cqrlog, mariadb gets removed and mysql installed instead. - However, for some reason the mysql installation failed. So it took me quite some time to remove & cleanup mysql again afterwards.

How can I install cqrlog using mariadb as before? Having mariadb installed beforehand did obviously not work, as the (ubuntu-stock) package apparently did require mysql-server explicitly.

Has anybody done this already and can possibly guide me through the steps?
Thanks & Vy73
Stefan.

oh1kh
Ubuntu 24.04 LTS demands mysql instead of mariadb

HI Stefan!
As you already have running Cqrlog in 22.04LTS you can first copy following file and folders to USB stick:

/usr/bin/cqrlog
/usr/share/cqrlog
~/.config/cqrlog (this one should remain over linux upgrade as it is in users home, but copying it as backup is not bad idea)

Remove Cqrlog installation on old 22.04 when you have copied files and folders. (removing should not touch ~/.config/cqrlog, but you have now backup)

Upgrade your linux
Install MariaDB

Restore files from USB stick to original places
/usr/bin/cqrlog
/usr/share/cqrlog

Check that ~/.config/cqrlog is there. If not restore it too.

Now you have Cqrlog installed with MariaDB but your linux packet manager does not know anything about it.
It might be that you need to create startup menu icon for Cqrlog manually if it disappeared with uninstall.

Usually Ubuntu problem is resolved installing just MariaDB after Cqrlog is already installed but if that fails you can fool your system doing things above.

--
Saku
OH1KH

do2hg
Hi Saku,

Hi Saku,
... thank you for your assistance.
I shy away from just installing the binary, as I have multiple machines running and want a proper setup, that is automatically updateable.

For the time being I startet out with this (https://www.cqrlog.com/node/4644) approach of installing mysql-server and cqrlog first and then reverting to mariadb-server.

However, this is where the shit hits the fan:

  • There appears to be some trouble with the mysql-server unit file, that I do not understand
  • Hence the installation of mysql-server does not run properly though and
  • hence I cannot replace it by mariadb-server

I have now the following:
# apt-get install mariadb-server
Paketlisten werden gelesen… Fertig
Abhängigkeitsbaum wird aufgebaut… Fertig
Statusinformationen werden eingelesen… Fertig
Die folgenden zusätzlichen Pakete werden installiert:
galera-4 libconfig-inifiles-perl libdbd-mysql-perl libdbi-perl
libmysqlclient21 mariadb-client mariadb-client-core
mariadb-plugin-provider-bzip2 mariadb-plugin-provider-lz4
mariadb-plugin-provider-lzma mariadb-plugin-provider-lzo
mariadb-plugin-provider-snappy mariadb-server-core pv socat
Vorgeschlagene Pakete:
libnet-daemon-perl libsql-statement-perl mailx mariadb-test
Die folgenden Pakete werden ENTFERNT:
default-mysql-client-core default-mysql-server default-mysql-server-core
mysql-client-8.0 mysql-client-core-8.0 mysql-server-8.0
mysql-server-core-8.0
Die folgenden NEUEN Pakete werden installiert:
galera-4 libconfig-inifiles-perl libdbd-mysql-perl libdbi-perl
libmysqlclient21 mariadb-client mariadb-client-core
mariadb-plugin-provider-bzip2 mariadb-plugin-provider-lz4
mariadb-plugin-provider-lzma mariadb-plugin-provider-lzo
mariadb-plugin-provider-snappy mariadb-server mariadb-server-core pv socat
0 aktualisiert, 16 neu installiert, 7 zu entfernen und 1 nicht aktualisiert.
2 nicht vollständig installiert oder entfernt.
Es müssen 18,1 MB an Archiven heruntergeladen werden.
Nach dieser Operation werden 10,6 MB Plattenplatz zusätzlich benutzt.
Möchten Sie fortfahren? [J/n] j

Vorkonfiguration der Pakete ...
(Lese Datenbank ... 322073 Dateien und Verzeichnisse sind derzeit installiert.)
Entfernen von default-mysql-server (1.1.0build1) ...
Entfernen von mysql-server-8.0 (8.0.39-0ubuntu0.24.04.2) ...
Failed to stop mysql.service: Unit mysql.service not loaded.
invoke-rc.d: initscript mysql, action "stop" failed.
dpkg: Fehler beim Bearbeiten des Paketes mysql-server-8.0 (--remove):
»installiertes pre-removal-Skript des Paketes mysql-server-8.0«-Unterprozess gab den Fehlerwert 1 zurück
dpkg: Zu viele Fehler, Abbruch
Failed to stop mysql.service: Unit mysql.service not loaded.
invoke-rc.d: initscript mysql, action "stop" failed.
Failed to preset unit, file "mysql.service": Der Link wurde beschädigt
/usr/bin/deb-systemd-helper: error: systemctl preset failed on mysql.service: No such file or directory
Failed to start mysql.service: Unit mysql.service not found.
invoke-rc.d: initscript mysql, action "start" failed.
Unit mysql.service could not be found.
dpkg: Fehler beim Aufräumen:
»installiertes post-installation-Skript des Paketes mysql-server-8.0«-Unterprozess gab den Fehlerwert 1 zurück
Fehler traten auf beim Bearbeiten von:
mysql-server-8.0
Bearbeitung wurde angehalten, da zu viele Fehler auftraten.
libdvd-pkg: Checking orig.tar integrity...
/usr/src/libdvd-pkg/libdvdcss_1.4.3.orig.tar.bz2: OK
libdvd-pkg: `apt-get check` failed, you may have broken packages. Aborting...
E: Sub-process /usr/bin/dpkg returned an error code (1)

This is really annoying.

There seems to be some trouble with the pre- and post-installation scripts and the mysql.service unit file. But even a forced uninstall (dpkg --force-all --purge mysql-server-8.0) and later re-install does not seem to help ...

What i did now is that I tweaked the /var/lib/dpkg/info/mysql-server-8.0.[postrm|prerm] files and commented the lines trying to stop mysql.service. - As i do not intend to run mqsql-server-8.0 at all, this seems to be the best way achieving the wanted behaviour.

After restarting the machine, I can now log into mariadb, however, connecting from cqrlog does not work yet.

I did on the mysql-console:
ADD USER 'cqrlog'@'localhost' IDENTIFIED BY 'secret password';
and then later tried to import my database dump with
# mysql -ucqrlog -p'secret password' < my-dumped-cqlrlog-db.sql

... however now I get:
ERROR 1045 (28000): Access denied for user 'cqrlog'@'localhost' (using password: YES)

... sorry I am not deep into database stuff ... I just want to have things working.
I already dread, that all the db-syncing stuff between my machines needs to be setup again as well ...

So, how do I set up a nice clean db from the dump in order to make cqrlog run again?

Thanks a lot and VY73
Stefan.

--
Stefan
DB4ST (ex DO2HG) --- German Ham Radio Station
D-32584 Löhne ----- Locator JO42IE