Accessing the MySQL server spawned by CQRlog

Since version 1.0.0~alpha1 CQRlog has used the ubiquitous MySQL database.  By default MySQL is used as an embedded database and the individual databases are stored under ~/.config/cqrlog/database/  This is all well and good and has the advantage of removing the need of a CQRlog user doing any sort if database admin type stuff.  It’s easy and works well.  My goal is to be able to access the database from outside of CQRlog for my own purposes.

After a bit of sleuth work I found that CQRlog starts a mysqld process that listens on TCP/IP port 64000.  The only problem is that when using the mysql utility to connect to that port I could not see any cqrlog named databases.  The ‘ps ax | grep mysql’ revealed that the  mysqld process is started with the –datadir option which points to the database directory above, but I could find no similar option for the mysql utility.  I finally stumbled upon a reference for using the file socket as in:

mysql -S /home/USER/.config/cqrlog/database/sock

which did the trick!  I can now browse the databases, for better or worse.


  • mysqld started by CQRlog has the –skip-grant-tables option passed to it so no user name or password is needed.
  •  CQRlog must be running for the file socket to be available.
  • A system wide MySQL database process is not used by CQRlog.  Perhaps that will be available in the future.

I’m sure there is much more to learn about all of this!


About Nate Bargmann

An amateur radio operator, vintage motorcycle enthusiast, and all around tinkerer interested in too many things to focus on one for very long. When I'm typing here, it's likely that I should be doing something else.
This entry was posted in Amateur Radio, Software. Bookmark the permalink.

One Response to Accessing the MySQL server spawned by CQRlog

  1. Pingback: An SQL query for unique SKCC numbers in CQRlog | N0NB

Leave a Reply