cqrlog cannot open database

2 posts / 0 new
Last post
cqrlog cannot open database

I just installed cqrlog on a raspi 4b. I got the error that I should set up run as root. I fllowed the procedure as specified. I now get this error:

Cqrlog Ver:2.3.0 (001) Date:2018-06-17
**** DEBUG LEVEL 1 ****

SSL libraries:

Loading libmysqlclient:
MySQL version: 10.
MySQL version assigned: 5.6
Loaded 118377 LoTW users
Loaded 115544 eQSL users
Loaded 40133 SCP calls
User home directory: /home/pi/
Program home directory: /home/pi/.config/cqrlog/
Data directory: /home/pi/.config/cqrlog/database/
Memebers directory: /home/pi/.config/cqrlog/members/
ZIP code directory: /usr/share/cqrlog/zipcodes/
Binary dir: /usr/bin/
Share dir: /usr/share/cqrlog/
TConnection to MySQL: 5.6
56 us states loaded
/usr/sbin/mysqld --defaults-file=/home/pi/.config/cqrlog/database/mysql.cnf --datadir=/home/pi/.config/cqrlog/database/ --socket=/home/pi/.config/cqrlog/database/sock --port=64000
2020-01-06 13:04:43 0 [Note] /usr/sbin/mysqld (mysqld 10.3.17-MariaDB-0+deb10u1) starting as process 21388 ...
select * from tables where table_schema = 'cqrlog_common'

SELECT log_nr,log_name FROM cqrlog_common.log_list order by log_nr

TApplication.HandleException TMySQL56Connection : Error executing query: Table 'cqrlog_common.log_list' doesn't exist
Stack trace:

During the 'run as root' setup I created a new password. I assume that since cqrlog setup did not ask anything about password that it cannot open. I can open mysql just fine and I do not find any database with a name similar to cqrlog.

Any assistance greatly appreciated.

Morris Ford

cqrlog cannot open database

You can open mysql fine. But what mysql? Cqrlog uses mysqld_safe thread for log database. If you just enter "mysql" at command line you open Pi's mysql server that does not have cqrlog databases ( unless you did NOT check "save log data to local machine" at first start. Then they really could be there, if permissions are set correctly)

Try this:
Open console and enter a line that you can copy from cqrlog debug text:

/usr/sbin/mysqld --defaults-file=/home/pi/.config/cqrlog/database/mysql.cnf --datadir=/home/pi/.config/cqrlog/database/ --socket=/home/pi/.config/cqrlog/database/sock --port=64000

Prompt will NOT come back. Last line you see is something like(this is from my laptop not RPI ! ):
2020-01-07 17:40:55 0 [Note] /usr/libexec/mysqld (mysqld 10.3.20-MariaDB) starting as process 7256 ...

Then open another console and give command that has same "socket" parameter:

mysql --socket=/home/pi/.config/cqrlog/database/sock

Then you should see mysql starting:

Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 8
Server version: 10.3.20-MariaDB MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]>

Then enter first command:

show databases;

MariaDB [(none)]> show databases;
| Database |
| cqrlog001 |
| cqrlog002 |
| cqrlog003 |
| cqrlog004 |
| cqrlog006 |
| cqrlog_common |
| information_schema |
7 rows in set (0.006 sec)

MariaDB [(none)]>

You should see your logs. At least "cqrlog001" and "cqrlog_common".
Then you can select database, view tables and so on.

Closing command window where mysqld is running will not close mysqld. After window is closed you have to kill process of mysqld running still with those parameters you entered.
Use the second command terminal that you used for mysql. give:

ps ax| grep mysqld

Check the number (process id) at the start of mysqld line and give.
kill -9 that_process_id_number

recheck with:
ps ax| grep mysqld
and now mysqld should be gone.

It seems that starting cqrlog as first time has gone wrong somehow. If there is no valuable data in log (I.E. never used before) you can delete hidden folder .config/cqrlog

rm -rf /home/pi.config/cqrlog

Then cqrlog starts and says "this is the first time..." and you get fresh start again.