I am guessing no one else has ever had this problem because when I search I get nothing.
CQRlog does not open and has an error that there is no connection to the database. I am using mysql and I have no problem connecting however I do not get the opportunity to give credentials to CRQlog so that it may connect, or create the database.. so it not working is not surprising. is there a config file someplace that I can edit to give it what it needs? I seem to be an expert at making things more difficult than most. seems others also have this problem, I can not install mariadb instead of MySql, too many other databases running on it, I suppose I could use it on my laptop but would really perfer a mysql solution.
Marc.
Ki5zho
Mon, 2023-03-06 20:34
#1
Database creation and connection
HI Marc!
Yes, It is common problem that Ubuntu (and other Debian derivatives) have mysql as default and it's security is set so that it cannot run database server safe thread if database exists in user's directory (here ~/.config/cqrlog/database)
MariaDB allows that, and that¨s why it is the engine to use with Cqrlog.
You do not tell what is your Cqrlog version. If it is 2.6.0 (compiled from source as there is no package) it has three options at fresh start to choose where store your logs.
1)
to user directory ~/.config/cqrlog/database. That is the default and easiest, if database engine allows that.
Full backup is the easiest possible: just copy whole ~/.config/cqrlog to safe place.
2)
to local machine's default sql server that runs @ port 3306. In this case Cqrlog tries to create SQL user for Cqrlog and give all privileges for it. It also creates backups scripts (mysqldump) for backup of the log database and copy of ~/.config/cqrlog (both needed in this case).
3)
Same as 2) but user have to create the SQL user, backups scripts and set values to "Database connection" window by himself. For advanced users. (This is same as uncheck "Do you want to save log data to local machine" at frist start of older Cqrlog versions).
If you have many databases running I assume you are familiar with mysql and can create Cqrlog database user and backup scrips by yourself.
To get a new fresh start, IF YOU HAVE NO LOGS YET IN ~/.config/cqrlog/database, you need just delete folder ~/.config/cqrlog It cleans ALL logs and SETTINGS and gives fresh, first time start for Cqlog again.
Once done that make Cqrlog SQL user before starting Cqrlog.
sudo mysql
When you get mysql prompt type following lines (copy /paste):
CREATE USER IF NOT EXISTS 'cqrlog'@'localhost' IDENTIFIED BY 'cqrlog';
GRANT ALL PRIVILEGES ON *.* TO 'cqrlog'@'localhost';
FLUSH PRIVILEGES;
QUIT;
You may have to change localhost to IP address of your SQL server network card's address if your SQL server runs at different machine than Cqrlog.
You can also alter GRANT to give all privileges just for cqr%.* instead of *.* to get little more security (all cqrlog databases begin with "cqrlog")
Then start Cqrlog.
Be sure NOT to select "save log data to local machine". Then you will see columns for SQL user and password and SQL server IP address and port. Fill them and check "remember" and "auto connect"
Click "connect" and creation of first log should begin.
I have used SQL server at localhost, 3306 since the beginning of Cqrlog usage and it has worked perfectly. Also from remote network address (via ssh and Openvpn tunnels).
I also have database replication with ham computer's sql-server and my home server's sql-server for keeping databases in two places.
--
Saku
OH1KH
Saku,
I have run into a similiar database problem with CQRLOG. Im running version 2.3.0 on a raspberry pi. An error appears which states
"Error during connection to database: TMySQL51Connection can not work with the installed MySQL client version: Expected (5.1), got (3.1.20)."
i used "sudo mysql " and was able to access MariaDB and pasted in the commands.
I have deleted the folder and started again.
Error still appears and I have changed to localhost as well as 3306 but still no joy.
I would appreciate any help as I am not totally up to speed on mysql.
Thank you Martin EI5GB
Hi Martin!
It does not show out as similar problem, but database related problem.
Your problem seems to be to old mysql client version, as the error text says.
Have you recently installed this Cqrlog or have you used it for some time?
Just wondering because you say version is 2.3.0 and latest version from package is 2.5.2 and source version 2.6.0.
You should find later version of Cqrlog and try with it.
I have an update script that can install 2.6.0 official or 2.6.0 Alpha for raspberry. Both are compiled with RPi4 having "Linux rpi4 5.10.103-v7l+ #1529 SMP Tue Mar 8 12:24:00 GMT 2022 armv7l"
You find newupdate.zip including newupdate.sh that should be started in command terminal from https://github.com/OH1KH/cqrlog/blob/loc_testing/compiled
Once started and selection list opened you should use either "3) Arm Official Gtk2" or "7) Arm Alpha test version" for RPi suitable update.
I think it is not worth of trying with version 2.3.0
--
Saku
OH1KH
Thank you Saku for your reply.
Martin EI5GB