installation discrepancies--what's the real way and which db?

7 posts / 0 new
Last post
n3wtk
installation discrepancies--what's the real way and which db?

My old computer died but fortunately I kept a copy of the backup, the .adi file saved on exit.
I have a new lubuntu 21.10 (impish) installation.
Using muon package manager I installed CQRLOG; unfortunately, out of the box so-to-speak it doesn't work; it complained of SQL database problems, same as this person has in their post here:

https://www.cqrlog.com/node/3330

There it is said that CQRLOG no longer works with MySQL version 8 and up.

So I remove .config/cqrlog,
remove all mysql stuff
install mariadb stuff, libmaria-dev-compat, mariadb client, server, core, devel and so on.

I follow the instructions in the CQRLOG FAQ here: https://www.cqrlog.com/faq
A couple of things left out -- you have to put in [trusted=yes] into the resultant file,
/etc/apt/sources.list.d/ok2cqr-ubuntu-ppa-impish.list
And then when you run sudo apt-get update it gives some "not found" errors:


Err:8 http://ppa.launchpad.net/ok2cqr/ppa/ubuntu impish/main amd64 Packages
404 Not Found [IP: 91.189.95.85 80]
Ign:9 http://ppa.launchpad.net/ok2cqr/ppa/ubuntu impish/main all Packages
Ign:10 http://ppa.launchpad.net/ok2cqr/ppa/ubuntu impish/main i386 Packages
Ign:11 http://ppa.launchpad.net/ok2cqr/ppa/ubuntu impish/main Translation-en
Ign:12 http://ppa.launchpad.net/ok2cqr/ppa/ubuntu impish/main Translation-en_US
Ign:13 http://ppa.launchpad.net/ok2cqr/ppa/ubuntu impish/main amd64 DEP-11 Metadata
Ign:14 http://ppa.launchpad.net/ok2cqr/ppa/ubuntu impish/main all DEP-11 Metadata
Ign:15 http://ppa.launchpad.net/ok2cqr/ppa/ubuntu impish/main DEP-11 48x48 Icons
Ign:16 http://ppa.launchpad.net/ok2cqr/ppa/ubuntu impish/main DEP-11 64x64 Icons
Ign:17 http://ppa.launchpad.net/ok2cqr/ppa/ubuntu impish/main DEP-11 64x64@2 Icons
Ign:18 http://ppa.launchpad.net/ok2cqr/ppa/ubuntu impish/main DEP-11 128x128 Icons
Fetched 326 kB in 29s (11.3 kB/s)
Reading package lists... Done
E: Failed to fetch http://ppa.launchpad.net/ok2cqr/ppa/ubuntu/dists/impish/main/binary-amd64/Packages 404 Not Found [IP: 91.189.95.85 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.

Okay, ignore that and continue on with what the FAQ says. Next it says to run install...


dhale@hamshack:~$ sudo apt-get install cqrlog
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
galera-4 libaec0 libconfig-inifiles-perl libdbd-mariadb-perl libdbi-perl libgsl25 libgslcblas0 libhdf4-0
libhdf5-103-1 libhpdf-2.3.0 libmgl-data libmgl7.5.0 libmysqlclient21 libsz2 libterm-readkey-perl socat
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
cqrlog-data default-mysql-server mysql-client-8.0 mysql-client-core-8.0 mysql-server-8.0
mysql-server-core-8.0
Suggested packages:
mailx tinyca
The following packages will be REMOVED:
mariadb-client-10.5 mariadb-client-core-10.5 mariadb-server-10.5 mariadb-server-core-10.5
The following NEW packages will be installed:
cqrlog cqrlog-data default-mysql-server mysql-client-8.0 mysql-client-core-8.0 mysql-server-8.0
mysql-server-core-8.0
0 upgraded, 7 newly installed, 4 to remove and 4 not upgraded.
Need to get 0 B/34.5 MB of archives.
After this operation, 133 MB of additional disk space will be used.
Do you want to continue? [Y/n] n

But there you can see it is saying that it wants to remove MariaDB and install MySQL8, which we've already established doesn't work! (both through my trial-and-error and OH1KH's statement).

So.... what gives? How do I get this going?

I'm about to give up and use a different logger but I really like CQRLOG so I'd like to get this figured out!

Dave

n3wtk
almost solved, not

I was about to say that I solved it by building from sources.

Again following the instructions in the FAQ the installation went just fine.
And CQRLOG started up just fine!
I thought it was solved. No errors!
Then it hung. It never recovered so I killed it.
When I went to start it again, it doesn't run anymore; it gives this error:


TMySQL57Connection : Error executing query: Can't create database 'cqrlog_common' (errno: 2 "No such file or directory").
Press OK to ignore and risk data corruption.
Press Abort to kill the program.

Of course if I abort then it kills the program. If I click OK to ignore, it seems like it works, until I try to do anything else, and I get the error again, over and over.

So, it seems CQRLOG is a bust on Ubuntu 21.10 impish?

oh1kh
almost solved, not

Hi!

No solution yet but I can say that when I was making a new version tests with cqrlog I suddenly faced same error message yesterday.
I have not had time to find the reason yet. All I have noticed is that ~/.config/cqrlog/database folder is completely empty and it should not be so.

My all qsos are stored in SQL server running in same PC at port 3306 (The "real" SQL server that appears there when MariaDB is intalled) So there is no problem with qso data.
Cqrlog's "Save data in local machine" uses ~/.config/cqrlog/database folder as database base and starts another SQL server running in this folder. If there is nothing "No such file or directory" is very expected error message.

BTW the update I am working for is one where the question about first time start and log saving to local machine is replaced with three selections: Log in user folder (the old default), log in local sql server (what I am usen now) and log in external SQL server (in network).

Using the second option "local sql server" works lot more easier that the default (first one). It just have two things that must be solved.
Local SQL server needs a database user with password and privileges to create and use cqrlog databases. And backup of database must be with mysqldump (of course adif backups works as before).
That is what I am working for now.

--
Saku
OH1KH

oh1kh
almost solved, not

Hi!

My problem was solved by deleteing whole ~/.config/cqrlog folder.
Then copied the backup folder ~/.config/cqrlog_bak (that I had made before) to ~/.config/cqrlog
After that check that ~/.config/cqrlog has all subfolders and that subfolder "database" has files inside.

Finally I did command-line command:

sudo chown -R saku.saku ~/.config/cqrlog

To be sure that all files and folders are owned by my username. That was because I had done all kinds of weird tests and wanted to be sure that no files were owned by root.

--
Saku
OH1KH

n3wtk
try a supported version

I had no ~/.config/cqrlog directory to be incorrect; this was a fresh installation and it doesn't work when installed as per the FAQ. However, to be fair, I just now noticed that the 21.10 (impish) version of Ubuntu that I was using is not listed on the download page, so I re-installed the OS using ubuntu 20.04 LTS.

I then followed this instruction:
sudo add-apt-repository ppa:ok2cqr/ppa;sudo apt-get update;sudo apt-get install cqrlog
indicated on https://www.cqrlog.com/download and all seems to be working!

I imported my backup .adi file and looks like I'm back in business.

73,
Dave N3WTK

n0op
This is the wrong way to set up an application with databases.

oh1kh: Eliminating MySQL executable packages from an entire server to get one application working using MariaDB is not a reasonable solution. Lots of other applications use MySQL and both can exist on the same machine at the same time if properly set up. What we need is a script that sets a unique environment for CQRlog targeting a specific instance of MariaDB. See excerpts from MySQL documentation below:

MariaDB coexist with MySQL
Hello,
I'm currently using MySQL and would like to test MariaDB.
I only have one server, and don't wish to overwrite the current MySQL instance.
Is it possible to have both MySQL and MariaDB to coexist within the same environment?
How can I define the mysql client on which db to connect to? by port?
Many thanks!
Answer
Yes, it is. Just as two MySQL instances can coexist. MariaDB is still a drop-in replacement.
By port or by different socket path, and install MariaDB to a non-standard directory.
This article on dev.mysql.com has details of how to run multiple MySQL instances on a single server. The instructions are also valid for running MySQL and MariaDB on the same server.

5.8 Running Multiple MySQL Instances on One Machine
5.8.1 Setting Up Multiple Data Directories
5.8.2 Running Multiple MySQL Instances on Windows
5.8.3 Running Multiple MySQL Instances on Unix
5.8.4 Using Client Programs in a Multiple-Server Environment
In some cases, you might want to run multiple instances of MySQL on a single machine. You might want to test a new MySQL release while leaving an existing production setup undisturbed. Or you might want to give different users access to different mysqld servers that they manage themselves. (For example, you might be an Internet Service Provider that wants to provide independent MySQL installations for different customers.)
It is possible to use a different MySQL server binary per instance, or use the same binary for multiple instances, or any combination of the two approaches. For example, you might run a server from MySQL 5.7 and one from MySQL 8.0, to see how different versions handle a given workload. Or you might run multiple instances of the current production version, each managing a different set of databases.
Whether or not you use distinct server binaries, each instance that you run must be configured with unique values for several operating parameters. This eliminates the potential for conflict between instances. Parameters can be set on the command line, in option files, or by setting environment variables. See Section 4.2.2, “Specifying Program Options”. To see the values used by a given instance, connect to it and execute a SHOW VARIABLES statement.
The primary resource managed by a MySQL instance is the data directory. Each instance should use a different data directory, the location of which is specified using the --datadir=dir_name option. For methods of configuring each instance with its own data directory, and warnings about the dangers of failing to do so, see Section 5.8.1, “Setting Up Multiple Data Directories”.
In addition to using different data directories, several other options must have different values for each server instance:
• --port=port_num
--port controls the port number for TCP/IP connections. Alternatively, if the host has multiple network addresses, you can set the bind_address system variable to cause each server to listen to a different address.
• --socket={file_name|pipe_name}
--socket controls the Unix socket file path on Unix or the named-pipe name on Windows. On Windows, it is necessary to specify distinct pipe names only for those servers configured to permit named-pipe connections.
• --shared-memory-base-name=name
This option is used only on Windows. It designates the shared-memory name used by a Windows server to permit clients to connect using shared memory. It is necessary to specify distinct shared-memory names only for those servers configured to permit shared-memory connections.
• --pid-file=file_name
This option indicates the path name of the file in which the server writes its process ID.
If you use the following log file options, their values must differ for each server:
• --general_log_file=file_name
• --log-bin[=file_name]
• --slow_query_log_file=file_name
• --log-error[=file_name]
For further discussion of log file options, see Section 5.4, “MySQL Server Logs”.
To achieve better performance, you can specify the following option differently for each server, to spread the load between several physical disks:
• --tmpdir=dir_name
Having different temporary directories also makes it easier to determine which MySQL server created any given temporary file.
If you have multiple MySQL installations in different locations, you can specify the base directory for each installation with the --basedir=dir_name option. This causes each instance to automatically use a different data directory, log files, and PID file because the default for each of those parameters is relative to the base directory. In that case, the only other options you need to specify are the --socket and --port options. Suppose that you install different versions of MySQL using tar file binary distributions. These install in different locations, so you can start the server for each installation using the command bin/mysqld_safe under its corresponding base directory. mysqld_safe determines the proper --basedir option to pass to mysqld, and you need specify only the --socket and --port options to mysqld_safe.
As discussed in the following sections, it is possible to start additional servers by specifying appropriate command options or by setting environment variables. However, if you need to run multiple servers on a more permanent basis, it is more convenient to use option files to specify for each server those option values that must be unique to it. The --defaults-file option is useful for this purpose.

oh1kh
This is the wrong way to set up an application with databases.

HI!

Yes it is true that you can set up system with both SQL database servers. But that is far over average users knowledge.
Also very often the Linux gear is used just for hamshack operations that very seldom need specified SQL server anywhere else than in logbook usage.

Both MYSQL and MariaDB are using same command structure and are very far compatible.
The problem usually arises with (stupid) packages that require specific named dependencies to be filled.

To ease the pain with SQL servers the latest Cqrlog source now has fixed first time start. That offers the old method "save log data to local machine", now named to "save log data to user folder" what it actually has been also before.

If that fails due to reason that SQL server thread can not start using user folder based files user has second option to "save log data to local SQL server".
With that option Cqrlog tries to create and execute a script that adds database user with password and sufficient rights to create databases to local SQL server. The SQL server exist there in all cases as it is a dependency for Cqrlog. It is running there already at port 3306 just waiting for use.
In that case it does not matter if server is MYSQL or MariaDB, both will work.
With that option Cqrlog also makes a backup script that dumps all CQR* databases with mysqldump. That is because now saving just ~/.config/cqrlog folder is not enough for complete backup.
Script (SQL user addition) and running it from Cqrlog is not failproof, but I wish that would help ordinary user to get Cqrlog running if the first option refuses to start.

As third option there is the "old" remote SQL server usage that has been there before. It is actually the same as option two, but without SQL user and backup script creation. For advanced users.

--
Saku
OH1KH