Database access denied after moving to new system

9 posts / 0 new
Last post
g8tmv
Database access denied after moving to new system

I have been using cqrlog for a long time.

I do *NOT* use a 'local' database because I access the database from more than one computer.

I've just moved to a new system after the old one died - but I have a non-bootable image of the disk, so all my files are okay.

The new system is Debian 12 (Bookworm) with the KDE desktop

I installed Maria-DB server and client.

I then installed the Debian package for CQRLOG which is version 2.5.2

When I try to run it I get the following message.

TMySQL57Connection: Error executing query: Access denied for user 'cqrlog'@'localhost' to database 'cqrlog-common'

After this I remembered that I have to add the cqrlog user and password to MariaDB and I've done that but it has not fixed the problem

I have a dim memory from the last time I moved systems that there is something else that needs to be done.

Help please!

Colin G8TMV

ok2cqr
ok2cqr's picture
Re: Database access denied after moving to new system

Hi Colin,

it seems you forget to change address of the MySQL server. CQRLOG is trying to connect to the local database and not to you remote one.
It's in the Database connection where you enter the username and password.

I also don't use local database and it works fine.

73 Petr, OK2CQR

g8tmv
That is not the problem - I

That is not the problem - I am creating a clone of the old install so all the names (localhost in this case) are the same.

It seems that the problem may be that MariaDB has changed the way that things like GRANT work in the latest version.

I think that you need to test non-local databases on Debian 12 (or the equiv Ubuntu version)

and PLEASE can we have a new release!

Colin G8TMV

oh1kh
HI Colin!

HI Colin!

Check also that you have granted all permissions to user cqrlog@localhost for databases cqr% at mysql server side.

I assume your mysql server is in same computer as your Cqrlog runs. Then cqrlog@localhost will appear to error message

--
Saku
OH1KH

g8tmv
I've checked and it looks

I've checked and it looks like the permissions are correct.

I don't have time to debug this atm and I need my logging working so I have gone for a 'local' database and that is working.

I need to update to one of your alpha builds to get clublog working again and I see that you build for qt5 which I have

I think the standard released version was built for GTk - is that correct?

Colin

oh1kh
I've checked and it looks

HI Colin!
By the error message I am quite sure there is something with permissions.
Easiest way is to grant all permissions to cqrlog user for whole server if there are no other databases that need more secure setups.
See this message: https://www.cqrlog.com/comment/11126#comment-11126

The original Cqrlog uses GTK2 widgets.
It is possible to compile also for QT5 with "make cqrlog_qt5" and with latest Alpha clones also "make cqrlog_qt6" for QT6 version.

I am using QT5 with my Fedora39 and another local user here uses QT6 version with his Fedora40. Both working fine.

--
Saku
OH1KH

g8tmv
I tried several versions of

I tried several versions of the GRANT command and it kept telling me I had bad mysql syntax. Can you please tell me the *exact* command to fix this problem.

Thanks for the info on GTK2 being used on the standard build.

As I said I am using your QT5 build (Ver.alpha_(128)_QT5

My system is Debian 12 (Bookworm) this uses Wayland not X

When I start cqrlog I get the following error messages in the terminal window:

colin@doombar:~$ cqrlog
qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
qt.qpa.wayland: Wayland does not support QWindow::requestActivate()

Cqrlog Ver:alpha_(128)_QT5 Date:2024-06-24
**** DEBUG LEVEL 0 ****
**** CHANGE WITH --debug=NR PARAMETER ****
*** Parameter -h or --help for details ***

OS:
Linux version 6.1.0-23-amd64 (debian-kernel@lists.debian.org) (gcc-12 (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) #1 SMP PREEMPT_DYNAMIC Debian 6.1.99-1 (2024-07-15)
/usr/bin/mysqld
qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
This plugin supports grabbing the mouse only for popup windows
This plugin supports grabbing the mouse only for popup windows

I think as more distros switch to wayland this will become a bigger problem.

I also have a problem with some windows not being big enough to show all the buttons.

This is most obvious in the "Preferences" dialog window on the TRX control tab where the Handshake, DTR and RTS settings drop down lists are 50% off the bottom of their panel.

Colin

oh1kh
I tried several versions of

Hi Colin!

Tested these with my Fedora 39 and 10.5.23-MariaDB-log MariaDB Server

MariaDB [(none)]> CREATE USER IF NOT EXISTS 'test'@'localhost' IDENTIFIED BY 'test1pass';
Query OK, 0 rows affected (0,003 sec)

For wider access from outside world:
MariaDB [(none)]> CREATE USER IF NOT EXISTS 'test2'@'%' IDENTIFIED BY 'test2pass';
Query OK, 0 rows affected (0,005 sec)

Full open grants:
MariaDB [(none)]> GRANT ALL PRIVILEGES ON *.* TO 'test'@'localhost';
Query OK, 0 rows affected (0,005 sec)

Just for Cqrlog tables:
MariaDB [(none)]> GRANT ALL PRIVILEGES ON `cqr%`.`%` TO `test`@`localhost`;
Query OK, 0 rows affected (0,006 sec)

And finally:
MariaDB [(none)]> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0,002 sec)

Note that full grants allow ' (ascii code 0x27) but "cqr%" specific grants need ` (ascii code 0x60) instead. Do not ask me why...

--
Saku
OH1KH

oh1kh
I tried several versions of

About the Wayland...

Cqrlog is depending on what Lazarus will support. All widgets are depended on what and how they support them.

Have you tried to compile QT6 version. You need to install libqt6pas and it's devel for that.
I do not know package name for debian, for Fedora40 they are qt6pas and qt6pas-devel.

At least with LXDE desktop (X server) the look is better than with QT5.
Perhaps also Wayland support could be better.
No way to test here (I keep myself out of that so long I can).

--
Saku
OH1KH