SQL error after CQRLOG update

2 posts / 0 new
Last post
DM1BM
SQL error after CQRLOG update

Hello all,

I have updated my working CQRLOG according to the description of Saku OH1KH to 'Alpha_138_(Gk2)' from his github.
The update process went without problems, but when starting CQRLOG I get the following error message:

Database upgrade crashed with this error:
TMySQL57Connection : Error executing query: You have an
error in your SQL syntax; check the manual that corresponds to
your MySQL server version for the right syntax to use near 'IF
NOT EXISTS b_cw NUMERIC(10,4) DEFAULT 0,ADD COLUMN
IF NOT EXISTS e_cw NUMERIC' at line 1

Unfortunately my knowledge of LinuxMint and MySQL is nearly non-existent as I have migrated from Win10 to LinuxMint not long before.
Does anyone have an idea how to solve the problem?

Thank you!

Bert
DM1BM

oh1kh
SQL error after CQRLOG update

HI Bert!

Do you "save qso data to local machine" or do you use an external SQL server?

If you use "save qso data to local machine" it seems that you have made a big jump with Cqrlog versions as it looks like you have had MYSQL server installed.
New Cqrlog versions (also CqrlogAlpha) have used MariaDB for long time already.

What makes me think you have MYsql server installed?
Your error says: "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near"
MariaDB error : "You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near"
Besides Linux Mint (like all Debian/Ubuntu variants use MYSQL as default install).

If you just started with Mint and installed Cqrlog but never tested it before upgrade to CqrlogAlpha without any qsos in log things are easy:
remove hidden folder ~/.config/cqrlog
install MariaDB, it will override MYSQL you need packages: libmariadb-dev-compat mariadb-client mariadb-server mariadb-common
start cqrlog and test that you can save a qso to log.
after that close cqrlog and do the upgrade to CqrlogAlpha.

If you have already qsos in log it is more complicated (but I can not understand how you have managed to log qsos with MYSQL, unless your cqrlog version has been very old!):

If you made upgrade with newupdate.sh script you have a backup of ~/.config/cqrlog folder and /usr/bin/cqrlog binary. Both having upgrade date stamp in their names.
You should restore them by copying them to original names and places.(Do a copy, do not rename!). Then you get old cqrlog with qsos back.
You will find backup folder from ~/.config/ folder and backup binary from /usr/bin (you need to use sudo to get root privileges to operate in /usr/bin folder)

Start old Cqrlog.
Make a full adif backup from all logs, install MariaDB sql server that will override MYSQL server.
Test that cqrlog works and have all qsos, if not make new log(s) and restore qsos from adif backups.
Once all works do upgrade to CqrlogAlpha again, now the database upgrade should work with MariaDB.

Your database upgrade has stopped to bands table upgrade.
I made a test with Mint and database upgrade from version 7 to 8 that has only just that bands table upgrade. It works without errors when database server is MariaDB.

--
Saku
OH1KH