Problem with instructions for configuring MYSQL/Mariadb in Doc under Trixie

42 views
Skip to first unread message

Peter Fletcher

unread,
Mar 27, 2026, 5:39:58 PM (8 days ago) Mar 27
to weewx-development
At least in the latest version of Trixie for the Raspberry Pi, the instructions in the Docs ( Configuring MySQL / MariaDB - WeeWX 5.3) for installing MySQL/Mariadb support  for weewx are wrong (presumably out of date). The first steps read:
sudo apt install mysql-client sudo apt install python3-mysqldb

'The first command results in the following error message:
Package mysql-client is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  mariadb-client-compat
Error: Package 'mysql-client' has no installation candidate'

Hopefully the suggested replacement package will work with weewx - the python3-mysqldb install does run without problems after mariadb-client-compat has been installed. I am in the process of testing this, and will report back.

Peter Fletcher

unread,
Mar 27, 2026, 7:10:39 PM (8 days ago) Mar 27
to weewx-development
Preliminary testing (running weectl database transfer from an existing sqlite database to a mariadb database) suggests that the suggested replacement package does, indeed, work, so the documentation presumably just needs to be updated with a note about the 'Trixie difference'.

Tom Keffer

unread,
Mar 28, 2026, 10:41:42 AM (7 days ago) Mar 28
to Peter Fletcher, weewx-development
Thanks, Peter

A few more details, please. 

- Did you use straight Debian-13, or some variant, such as Ubuntu 24.04? The former offers MariaDB by default, the latter MySQL.

- Did you install MySQL? Or, MariaDB? From which repository?

Another option would be to install the metapackage default-mysql-client, which is supposed to resolve to the appropriate client library.


--
You received this message because you are subscribed to the Google Groups "weewx-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-developm...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/weewx-development/00f5fa5f-34c2-44a9-8954-e2071f76cc24n%40googlegroups.com.

Peter Fletcher

unread,
Mar 28, 2026, 11:24:51 AM (7 days ago) Mar 28
to weewx-development
I am using RaspiOS, which is the version of Debian that is (somewhat) customized for the Raspberry Pi range, and is the recommended OS for Pis. The Mariadb server I am using is networked, but the distribution includes mysql-common and mariadb-client and its dependencies. 

In a sense, precisely what is in the distribution is irrelevant to the documentation issue, because I can attest that, if you don't install the additional packages (now mariadb-client-compat and python3-mysqldb) weewx errors out because it can't connect to the (networked) database, whereas, once you install them, it happily does so. I don't know (and have no practical way of testing) whether 'vanilla' Debian Trixie would have the same issue, but Rasbian Trixie certainly does. I also don't know if the same issue would crop up if the database were on localhost, but I suspect that it would.

Vince Skahan

unread,
Mar 28, 2026, 2:20:52 PM (7 days ago) Mar 28
to weewx-development
Tom - FWIW - https://packages.debian.org/search?keywords=mysql-client&searchon=names&suite=all&section=all seems to indicate that mysql-client package went away 'many' years ago probably in the debian-9 timeframe.  The only reference I can find there is debian-8.

Peter Fletcher

unread,
Mar 28, 2026, 2:45:45 PM (7 days ago) Mar 28
to weewx-development
My (working) Bookworm system has only mysql-common in its apt installed system packages. weewx on that system runs in a venv, and the relevant pip-installed packages are PyMySQL and mariadb.

Tom Keffer

unread,
Mar 31, 2026, 10:29:33 AM (4 days ago) Mar 31
to weewx-development
Fixed in commit https://github.com/weewx/weewx/commit/fda146dff8d9de52228f1f550523ac2a62950888

The online docs have been updated.

Reply all
Reply to author
Forward
0 new messages