Hi (again)
First of all I would like to acknoledge all the support from this forum I have ever received using Cqrlog.
Let me explain my case now: I have two radio and two computers in the same QTH and network. For several reasons I want to maintain the configuration but my issue now is that I want to share the same database already created with all my contacts.
The mainly used radio is managed by a laptop that contains the database locally created with over 3000 QSOs and the other one with a Raspberry Pi. So my aim is accesing to the laptop from the RPI to get the database log and update it with new contacts. Importing contacts from the RPI into the laptop using ADIF files is a nuisance. Both computers use the same home network.
I gazed through several topics in the forum so I had some clear idea about what to do but with no success.
What I did: I get the laptop IP and I started Cqrlog uncheking 'Save log data lo local machine'. So I typed the laptop IP, port 3306 and username and password as cqrlog. But I does not started. I also started as local and set same configuration on RPI, typing in the laptop IP adress and did not work either. I opened the 3306 ports in both machines.
I also tried to sudo mysql on the laptop to configure it as I read on https://www.cqrlog.com/node/2314 but I received ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
System is Ubuntu 20.04 and Cqrlog version is 2.5.
Please help?
Best regards
HI!
If you try first with 'Save log data lo local machine' you have to start cqrlog in laptop because starting it starts the mysql_safe thread (second mysql server in laptop).
When cqrlog is running you can try to connect with RPi.
First you have to open laptop firewall allowing TCP connect to port 64000. That is the port what the mysql_safe uses (you can see that if you start from command line: cqrlog --debug=1 It is shown there in the beginning of debug dump).
When firewall is open open cqrlog in RPi and uncheck there 'Save log data lo local machine'. Put laptop IP as server IP and 64000 for port.
Username may be cqrlog and password cqrlog. Press connect and you should get connected,
-----
Second way is to move your log data from mysql_safe thread to the "real" mysql server that runs laptop at port 3306.
First start cqrlog in usual way (keep 'Save log data lo local machine' checked). Do backup of all your logs with mysqldump. See this message https://www.cqrlog.com/comment/8378#comment-8378
When dump has been done close cqrlog.
Next try to import you dump file to mysql server at laptop port 3306.
You need first to make mysql user cqrlog and give rights to use database server.
Log in to your database as administrator (command console: sudo mysql) and give command:
GRANT ALL PRIVILEGES ON *.* TO 'cqrlog'@'%' IDENTIFIED BY 'cqrlog';
Change user "cqrlog" and password "cqrlog" ones you want to use.
Note that that this will give full rights to do ANYTHING on this database server. You can start with that, but I suggest you limit user rights if you are using database server also for other databases than cqrlog. If cqrlog is the only usage then this is ok.
Once that is done you can try to import your database dump file:
mysql -ucqrlog -pcqrlog < your_database_dump_file.sql
When that is ok start cqrlog uncheck 'Save log data lo local machine' and put sever address as your laptop IP (or localhost) and port 3306. User cqrlog password cqrlog and try to connect.
It should connect and you see all your logs again.
Next the RPI.
Check that laptop's firewall is open for TCP port 3306.
Now there is no need to start cqrlog in laptop. It is enough it has power on. mysql server starts at boot.
In RPi put sever address as your laptop IP and port 3306. User cqrlog password cqrlog and try to connect. Should work ok.
So the main difference is that if you keep 'Save log data lo local machine' checked at laptop and use port 64000 with RPi the cqrlog must be running in laptop before RPi can connect to log data.
If you use "real" mysql server at port 3306 and move your logs there it is enough that laptop has power on and you can connect to log data with RPi.
--
Saku
OH1KH
Hi Saku
It worked! I followed the steps for the first way because seemed to be much easier to me and it work at first attempt.
However I still find an issue: After managing the 'Configuration storage seetings' to set up some tab as 'Local computer only' and some others as 'Common for all computers' and checking that the same configuration is set in both computers, the fldigi/wsjtx configuration is always got from the laptop (server) although is set to 'local computer only' in both machines. Rsst of tabs seems to work properly. Is there any bug in the code and fldigi/wsjtx is always taken from the server (common instead of local)?
Another remark (not an issue now): After installing Cqrlog in a couple of machines running Ubuntu 20.04 I always experienced the 'Wait/Abort' dialog at the start up but after waiting 4-5 seconds it always started. It was no issue to me, quite annoying but nothing to worry about because it worked ok. Perhaps someting to do with Mariadb/Mysql.
But ... after accesing to the databse from the Rpi, the wait/abort dialog bog disappeared and the application starts on the laptop very quickly. Amazing side effect!
Thank you very much for your support.
Best regards
HI!
Local settings:
There might be a bug in local settings. I have never used local settings so perhaps I have missed it. I'll try to use that some day and see how fldigi/wsjtx configuration works.
Wait/Abort:
It could be because it takes some time to start the mysql_safe thread that runs in ~/.config/cqrlog/database. If you start cqrlog from command line as
cqrlog --debug=1
you might see like:
210131 13:12:32 mysqld_safe Starting mysqld daemon with databases from /home/saku/.config/cqrlog/database/
TMySQL57Connection : Server connect failed.
Trying:1
Trying count number increases every time cqrlog ties to connect database and fails. Failure happens because the started mysql_safe server is not yet ready to accept client connections.
If it runs out of tries you see 'Wait/Abort' dialog and after a while when you answer mysql_safe is already ready fro connections.
That is the thing that comes first in to my mind.
When mysql sever at port 3306 is used then this should not happen as the server is there ready and running already at PC startup.
--
Saku
OH1KH
Local settings:
Yes!
There is a long existing (from beginning of wsjt remote) bug in fldigi/wsjt local settings. It saves only fldigi settings as local, not wsjt settings.
I will make fix for this.
Thanks for reporting this bug !
--
Saku
OH1KH