Linux Mint - Database connection error

8 posts / 0 new
Last post
Linux Mint - Database connection error


I have recently installed mint and have been at odds trying to connect to the sql server. I keep getting this error upon startup:

Error during connection to database: TMySQL57Connection : Server connect failed.

I have went in to a terminal and tried:

sudo apt-get install mariadb-client-10.3 mariadb-server-10.3 libmariadb3 libssl-dev libmariadb-dev-compat

as I seen a previous thread about dependencies.

So when I run that install command, I get these errors:

sudo apt-get install mariadb-client-10.3 mariadb-server-10.3 libmariadb3 libssl-dev libmariadb-dev-compat
Reading package lists... Done
Building dependency tree
Reading state information... Done
libssl-dev is already the newest version (1.1.1f-1ubuntu2.1).
libmariadb-dev-compat is already the newest version (1:10.3.25-0ubuntu0.20.04.1).
libmariadb3 is already the newest version (1:10.3.25-0ubuntu0.20.04.1).
The following additional packages will be installed:
mariadb-client-core-10.3 mariadb-server-core-10.3
Suggested packages:
mailx mariadb-test tinyca
The following packages will be REMOVED:
default-mysql-server mysql-client-8.0 mysql-client-core-8.0 mysql-server-8.0
The following NEW packages will be installed:
mariadb-client-10.3 mariadb-client-core-10.3 mariadb-server-10.3
0 upgraded, 4 newly installed, 5 to remove and 56 not upgraded.
Need to get 0 B/17.1 MB of archives.
After this operation, 33.3 MB disk space will be freed.
Do you want to continue? [Y/n] y
Preconfiguring packages ...
(Reading database ... 281861 files and directories currently installed.)
Removing default-mysql-server (1.0.5ubuntu2) ...
Removing mysql-server-8.0 (8.0.22-0ubuntu0.20.04.3) ...
Failed to stop mysql.service: Unit mysql.service not loaded.
invoke-rc.d: initscript mysql, action "stop" failed.
dpkg: error processing package mysql-server-8.0 (--remove):
installed mysql-server-8.0 package pre-removal script subprocess returned error exit status 1
dpkg: too many errors, stopping
Failed to stop mysql.service: Unit mysql.service not loaded.
invoke-rc.d: initscript mysql, action "stop" failed.
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: error while cleaning up:
installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)

Help is GREATLY appreciated. Thank you.

I went and approached a few

I went and approached a few more avenues, ended up finding IIRC, a frozen file in the mysql directory--ended up re installing the OS after things starting getting slopping with installing via tar ball.

After fresh install I went back a few threads on the forum where one said he was able to install cqrlog running mint with ease, I tried with installing:

sudo apt-get install mariadb-client-10.3 mariadb-server-10.3 libmariadb3 libssl-dev libmariadb-dev-compat

then went in to software manager within mint to add cqrlog and did not work successfully, but did get a little further after running cqrlog and got a couple of pop up windows that I did not get before.

Am I missing something?

Linux Mint - Database connection error


Did you mean this message ?

It really was so easy. You did use almost same commands. I guess I should have to install also libssl-dev to get it work with eQSL and TQSL, but without it cqrlog started ok.
What is difference between "apt-get install" and "apt install" ? I do not know as I normally use Fedora and command there is "dnf install".

Note that my message has three chapters:
First I install madiadb and cqrlog from package (at this point cqrlog should run and is usable for logging)
Second I install some compile tools and upgrade cqrlog to latest version from Petr's GitHub source.
Third I install support for QT5 and recompile updated cqrlog to use QT5 graphics.

Following only the first chapter you should get a running cqrlog. I stronly recommend to execute also the second chapter to update the cqrlog. So many bug fixes and new properties has added since the package release.

Third part is what you actually do not need if you Mint still has the GTK2 support. Distributions are moving to GTK3 and that does not work with cqrlog. Then you need the alternative: QT5

You said you did get a little bit further and got few pop up windows more. What did they say?


I can not clearly remember

I can not clearly remember the pop up window--but I think all it really was, was another error.

So following your instructions; I did get it installed. It brings up the Database conneciton window, where all it has is one column.

I went back and watched the video from K8WDX on here, but am not clear on where all the extra windows are.

I see this window down below, but don't see the main program itself. When watching the video on here I don't know where he drags the meat and potatoes from.


Linux Mint - Database connection error


Now the database connection window lets you decide do you have/want to use external mysql server (might be in another computer). That case you have to fill those fields about address, port, username and password. And if you want cqrlog to take auto connect and remember username/password.

Most of the cases people do not need/want to use external database server. Then they check "save data to local machine" I think that is what you also want to do. So check that checkbox.
All your logs and settings will then be saved to your home folder ~/.config/cqrlog The ".config" is hidden folder so you must allow "show hidden files and folders" setting in your file browser if you want to look to that folder.

After checking the checkbox cqrlog will create the first log for you called log001. You can add more logs via this window by your needs.

After log001 exist you can open it and get in to the program.
If you like always open the log that was active on last session check the bottom checkbox "open recent log after program start" . If that is checked you can come back to this database connect window from NewQSO/File/Open or create new log selection.

Once you get first log open I recommend to use HELP that is found from NewQSO (and also from another windows) selection list.

You may also look at some videos I have done (not high quality entertainment)


If there is a hiccup along

If there is a hiccup along the way--I'm finding it.

So I went ahead to login to the database to put in the initial entry and I was greeted with this error:

Error during connection to database: TMySQL57Connection : Server connect failed.

So I searched and found some older threads to output the log

cqrlog --debug=1


Linux version 5.4.0-58-generic (buildd@lcy01-amd64-004) (gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)) #64-Ubuntu SMP Wed Dec 9 08:16:25 UTC 2020
SSL libraries:
Loaded 134350 LoTW users
Loaded 125829 eQSL users
Loaded 36919 SCP calls
User home directory: /home/rcmcmullen/
Program home directory: /home/rcmcmullen/.config/cqrlog/
Data directory: /home/rcmcmullen/.config/cqrlog/database/
Memebers directory: /home/rcmcmullen/.config/cqrlog/members/
ZIP code directory: /usr/share/cqrlog/zipcodes/
Binary dir: /usr/bin/
Share dir: /usr/share/cqrlog/
56 us states loaded
Grid map created


Went through some of the directory's looking for any kind of config file that I thought was relevant and turned up nothing--I went ahead and tried to reset the password

(I was using user=CQRLOG pass=CQRLOG, multiple combinations of lowercase vice/versa, no password, etc)

I used:

sudo systemctl stop mariadb
sudo mysqld_safe --skip-grant-tables --skip-networking &
mysql -u root
ALTER USER 'cqrlog'@'localhost' IDENTIFIED BY 'cqrlog';
SET PASSWORD FOR 'cqrlog'@'localhost' = PASSWORD('cqrlog');

Performed a reboot after I didn't have any sucess with sudo kill and still got the same error.

As a last ditch effort I did a apt remove of the packages and tried to reinstall but I think there is some configuration files hanging around that I wasn't too sure of removing.

In the attachment, I seen pass= so I figured no password...I'm all over it but can't get the right key to open the lock.


Linux Mint - Database connection error

HI !

I think you are now trying too hard way.
There is no need ever to adjust privileges for mysql_safe.

Lets clear things:
1) Question "save data to local machine" checked means that cqrlog will start new mysql_safe thread that runs server instance at 64000 port,and has access also via socket file at ~/.config/cqrlog/database/sock. There is no username or password, that server is completely open and cqrlog handles all settings to that by itself.

2) you do not check "save data to local machine" you still can save data to "local machine" if you access already running mysql server at localhost port 3306. In that case you have to grant all privileges to user cqrlog with password cqrlog (or use another username an password) before starting cqrlog. At cqrlog you set localhost 3306 your mysql username and password and try to connect database.

3) you do not check "save data to local machine" and you use mysql server in another networked computer. In that case you do same things as in #2), but change "Localhost" to servers IP address.

Most users want to use #1) case. It is easy, cqrlog will do all needed operations to access database.

Now, if you do not have any previous log or settings to save the easiest way to start all over again is to remove ~/.config/cqrlog.
From console:

rm -rf ~/.config/cqrlog

But be aware that ALL previous settings and logs are then gone!

Uninstall and install cqrlog does not do anything. It does not touch ~/.config/cqrlog folder and so you are again in same situation that existed before uninstall.

After deleted~/.config/cqrlog start cqrlog. Say YES to question "do you want to save data to local machine". If you get error about mysql connection before you see "log001" in "Open database" window then you have to check that your MariaDB installation is complete and it really has removed Mysql from your computer.

Check and fix it, remove again ~/.config/cqrlog and start cqrlog



It works! Thank you very much for the help! Started to dive a little into hamlib before I realized I need to raise a serial cable from the dead--progress one day at a time.