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.
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
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:
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
Hi Stefan!
I remember that when I was playing Debian/Ubuntu I got also "broken packages" and it was impossible to get rid of.
That's why I have stayed on Fedora, even that it has too fast upgrading cycle.
If you still have old version computer running you could transfer you logs with ADIF export and also use configuration export at database connect window.
That way you should get your logs and settings moved.
I am not mysql/MariDB expert either. The biggest reason for using MariaDB with Cqrlog is that it allows database creation to user's folder.
Mysql could work also if it is used as "external" database. It means do not check "save data in local machine".
Instead save data in local machine by using already running mysql service at port 3306.
There might be some sql commands that are MariaDB specific in Cqrlog code (I do not remember), but it is worth of trying anyway if MariaDB installing is impossible.
You need to make mysql user with password and grants, and also your future backups needs copy of ~/.config/cqrlog in addition with mysqldump from mysql server.
Creating user (copy from other thread of forum):
sudo mysql
When you get mysql prompt type following lines (copy /paste):
CREATE USER IF NOT EXISTS 'cqrlog'@'localhost' IDENTIFIED BY 'cqrlog';
GRANT ALL PRIVILEGES ON *.* TO 'cqrlog'@'localhost';
FLUSH PRIVILEGES;
QUIT;
You may have to change localhost to IP address of your SQL server network card's address if your SQL server runs at different machine than Cqrlog.
You can also alter GRANT to give all privileges just for cqr%.* instead of *.* to get little more security (all cqrlog databases begin with "cqrlog")
What comes to db syncing between computers it may need adjusting if you have twisted between MariaDB and Mysql.
--
Saku
OH1KH
Hi Saku,
... thanks a lot for your help. ... We are getting there ... slowly ...
I could give the user the privileges and import my db-dump. Good!
I can start CQRLOG and select a database for one of my calls.
However, then I get
TMySQL57 Connection: Error excecuting query: The user specified as definer ('cqrlog'@'%') does not exist.
I dropped the databases, dropped the user and started from scratch with
CREATE USER IF NOT EXISTS 'cqrlog'@'%' IDENTIFIED BY 'cqrlog';
... I do not know, why I had to replace the localhost with % but now I can connect to the db. - Fine.
I'll have to revisit the automatic db-syncing between machines but first I got to sort out a few other issues from the upgrade ...
... I'll be back ;-)
Stefan.
--
Stefan
DB4ST (ex DO2HG) --- German Ham Radio Station
D-32584 Löhne ----- Locator JO42IE