Mailing List Archive

MySQL Database connection through socket fails for MariaDB 10.6
After the upgrade to MariaDB 10.6 the backend could
not connect to the database because MariaDB was
configured to listen only on IPv6 addresses:
bind-address = ::
See https://mariadb.com/kb/en/server-system-variables/#bind_address
That behavior is new in MariaDB 10.6.

In terminal
$ mysql -u -p<passwd> mythconverg
worked, but
$ mysql -h 127.0.0.1 -u mythtv -p<passwd> mythconverg
failed.
Note: the former command uses a socket, the latter uses tcp to connect
to the database.


Nevertheless, mythbackend should connect via linux socket
to the database, but this failed:

(TestDBconnection) Start up testing connections. DB localhost, BE , attempt
0, status dbAwake, Delay: 2000
(checkPort) PortChecker::checkPort(): host localhost port 3306 timeLimit
1000 linkLocalOnly 0
(checkPort) PortChecker::checkPort(): socket state 1
(checkPort) PortChecker::checkPort(): socket state 0
(TestDBconnection) Start up testing connections. DB localhost, BE , attempt
1, status dbAwake, Delay: 2000
(checkPort) PortChecker::checkPort(): host localhost port 3306 timeLimit
5000 linkLocalOnly 0
(checkPort) PortChecker::checkPort(): socket state 0
(checkPort) PortChecker::checkPort(): socket state 0
...
(TestDBconnection) Start up failure. host localhost, status dbAwakeFail
(FindDatabase) FindDatabase() - failed
(main) Failed to init MythContext.
(~MythContext) Exiting

I checked the source code, there are no more log entries provided.

The config.xml shows
<Host>localhost</Host>
so mythtv should use the socket, but failed.

After I corrected the error in the MariaDB configuration
to use IPv4 addresses:
bind-address = *
backend started and the log shows
(TestDBconnection) Start up testing connections. DB localhost, BE , attempt
0, status dbAwake, Delay: 2000
(checkPort) PortChecker::checkPort(): host localhost port 3306 timeLimit
1000 linkLocalOnly 0
(checkPort) PortChecker::checkPort(): socket state 1
(checkPort) PortChecker::checkPort(): socket state 3
(checkPort) PortChecker::checkPort(): host localhost port 3306 timeLimit
30000 linkLocalOnly 1
(FindDatabase) FindDatabase() - Success!
Thus, in this case connection to the database via socket works!

In both cases, the configured mysqld socket is provided by mariadb:
$ ls -la /run/mysqld/mysqld.sock
srwxrwxrwx 1 mysql mysql 0 Apr 9 18:56 /run/mysqld/mysqld.sock


Now my questions:

Why does a connection from mythtv to the database via socket fail
if the bind-address is not properly configured in MariaDB?

Why does the same connection work via commandline?

Is it related to Ubuntu only and works on other setups
using MariaDB 10.6 (and IPv4) ?

Roland
Re: MySQL Database connection through socket fails for MariaDB 10.6 [ In reply to ]
On 04/09/2022 01:55 PM, Roland Ernst wrote:
> Why does a connection from mythtv to the database via socket fail
> if the bind-address is not properly configured in MariaDB?

This was almost definitely due to how you specified your MythTV database
configuration.

MythTV makes some assumptions, based on what the user-specified database
configuration says, about how to connect to the database. It "always"
prefers to use socket/shared-memory connections since they're faster,
unless the user specifies something that implies they explicitly want to
use TCP/IP connections.

Specifically, if the database port is 0 (flag saying use MySQL default)
or 3306 (MySQL default) and the DB host name is 127.0.0.1, it will
ignore the specified-as-an-IP-address host name and use localhost for
the DB host name and connect using sockets/shared memory. Thus, the
"always" is only true with IPv4.

https://github.com/MythTV/mythtv/blob/master/mythtv/libs/libmythbase/mythdbcon.cpp#L159

It's probably now time to update that conditional to take into account
the IPv6 equivalents of 127.0.0.1 (::1, 0:0:0:0:0:0:0:1, ...?). One
could probably even make an argument for handling 0.0.0.0 (and :: or
0:0:0:0:0:0:0:0), too, though it seems it's never been an issue so
far--or at least not enough of one to have caused much discussion.

Mike
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: MySQL Database connection through socket fails for MariaDB 10.6 [ In reply to ]
On Tue, Apr 12, 2022 at 2:25 PM Michael T. Dean <mtdean@thirdcontact.com>
wrote:

> On 04/09/2022 01:55 PM, Roland Ernst wrote:
> > Why does a connection from mythtv to the database via socket fail
> > if the bind-address is not properly configured in MariaDB?
>
> This was almost definitely due to how you specified your MythTV database
> configuration.
>
> MythTV makes some assumptions, based on what the user-specified database
> configuration says, about how to connect to the database. It "always"
> prefers to use socket/shared-memory connections since they're faster,
> unless the user specifies something that implies they explicitly want to
> use TCP/IP connections.
>
> Specifically, if the database port is 0 (flag saying use MySQL default)
> or 3306 (MySQL default) and the DB host name is 127.0.0.1, it will
> ignore the specified-as-an-IP-address host name and use localhost for
> the DB host name and connect using sockets/shared memory. Thus, the
> "always" is only true with IPv4.
>
>
> https://github.com/MythTV/mythtv/blob/master/mythtv/libs/libmythbase/mythdbcon.cpp#L159
>
> It's probably now time to update that conditional to take into account
> the IPv6 equivalents of 127.0.0.1 (::1, 0:0:0:0:0:0:0:1, ...?). One
> could probably even make an argument for handling 0.0.0.0 (and :: or
> 0:0:0:0:0:0:0:0), too, though it seems it's never been an issue so
> far--or at least not enough of one to have caused much discussion.
>
> Mike
>
>
>> This was almost definitely due to how you specified your MythTV database
>> configuration.

I do not - fully - agree.
The configuration of MythTV worked for MariaDB 10.5, but does not work in
10.6.
Before MythTV actually tries to connect to the database,
it checks if a QTcpSocket can be established on the host ('localhost')
and the given port.
See the logs in the first post and
https://github.com/MythTV/mythtv/blob/master/mythtv/libs/libmythbase/portchecker.cpp#L73

This check fails, because MariaDB is configured to use IPv6 only,
by 'bind-address = ::', the advised setting from the MythTVs wiki.
But, this behavior changed in MariaDB 10.6:
See https://mariadb.com/kb/en/server-system-variables/#bind_address

The setting of the 'bind-address=::' is advised by the MythTVs wiki for
IPv4, too.
Therefore, every user who upgraded to Ubuntu 22.04, using IPv4
and uses MariaDB and configured MythTV for multiple frontends,
will report the error, that the backend is not able to connect
to the database, anymore.
I expect troubles.
If this can be confirmed, we need to update the release notes,
the wiki related to mysql and do a 'heads-up' posting on the forum.

Roland
Re: MySQL Database connection through socket fails for MariaDB 10.6 [ In reply to ]
On Sat, Apr 9, 2022 at 5:56 PM Roland Ernst <rcrernst@gmail.com> wrote:
>
> After the upgrade to MariaDB 10.6 the backend could
> not connect to the database because MariaDB was
> configured to listen only on IPv6 addresses:
> bind-address = ::
> See https://mariadb.com/kb/en/server-system-variables/#bind_address
> That behavior is new in MariaDB 10.6.

Yes, it should clearly now be bind-address = *
with 10.6 (which is also supported from at
least 10.3).
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: MySQL Database connection through socket fails for MariaDB 10.6 [ In reply to ]
On Tue, Apr 12, 2022 at 8:55 PM Roland Ernst <rcrernst@gmail.com> wrote:


> This check fails, because MariaDB is configured to use IPv6 only,
> by 'bind-address = ::', the advised setting from the MythTVs wiki.
...
> The setting of the 'bind-address=::' is advised by the MythTVs wiki for IPv4, too.

Clearly the wiki should get updated to recommend "*"

> If this can be confirmed, we need to update the release notes,

This is arguably an upstream issue (change),
and while MythTV is responsible for its own
documentation (and the wiki) MythTV cannot
reasonably be expected to test all other software
updates (without a much much larger QA staff).
FWIW, the mariadb related bug/issue is at:
https://jira.mariadb.org/browse/MDEV-26194
which resulted in documentation updates.

An addition to the special notice and instructions
in the release notes for known issues is a good
thought (possibly also mention mythweb needing
to be upgraded if your system is upgrading to
php 8?). However, realistically, no one reads and
follows the release notes (otherwise they would
have already changed their mariadb bind-address,
because they would have likely researched the
mariadb changes from 10.5 to 10.6).

That said, the packaging that MythTV provides
for debian based repos is, as I recall, the one
that sets the bind-address to ::, and should be
updated (and a new patched package provided)
for those that use the MythTV deb packaging.
Hopefully someone who speaks fluent dpkg
can do so.

And, lastly, I will mention that TTBOMK the
project still has a stated policy of mysql first,
and according to mysql docs it still supports a
:: to mean both all ipv4 and ipv6 addresses
(while also supporting * to mean all, and is
the default for mysql).
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: MySQL Database connection through socket fails for MariaDB 10.6 [ In reply to ]
On Tue, Apr 12, 2022 at 11:09:29PM +0000, Gary Buhrmaster wrote:
> On Tue, Apr 12, 2022 at 8:55 PM Roland Ernst <rcrernst@gmail.com> wrote:
>
>
> > This check fails, because MariaDB is configured to use IPv6 only,
> > by 'bind-address = ::', the advised setting from the MythTVs wiki.
> ...
> > The setting of the 'bind-address=::' is advised by the MythTVs wiki for IPv4, too.
>
> Clearly the wiki should get updated to recommend "*"

Commenting out the bind-address line has always worked for me. Oddly,
the default value is an empty string but I don't see behavior for that
officially documented anywhere.

> And, lastly, I will mention that TTBOMK the
> project still has a stated policy of mysql first,
> and according to mysql docs it still supports a
> :: to mean both all ipv4 and ipv6 addresses
> (while also supporting * to mean all, and is
> the default for mysql).

Seeing as how MariaDB is the de facto "MySQL" on most (all?) other
distros not named Ubuntu, my feeling is it should officially be
supported too.

David
--
David Engel
david@istwok.net
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: MySQL Database connection through socket fails for MariaDB 10.6 [ In reply to ]
On Wed, Apr 13, 2022 at 2:19 AM David Engel <david@istwok.net> wrote:

> Commenting out the bind-address line has always worked for me. Oddly,
> the default value is an empty string but I don't see behavior for that
> officially documented anywhere.

The default for mysql is the equivalent of
bind-address=* (accept any ipv4/ipv6) per
https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_bind_address

The default for mariadb is actually empty,
which means it also listens on all ipv4/ipv6
addresses per:
https://mariadb.com/kb/en/server-system-variables/#bind_address

> Seeing as how MariaDB is the de facto "MySQL" on most (all?) other
> distros not named Ubuntu, my feeling is it should officially be
> supported too.

Which, arguably, means mythtv packaging
should not set any bind-address and let all
supported DB servers listen on all (available)
addresses by default (as long as the mythtv
setup creates appropriately secure user
passwords).

Yes, connecting via a local socket can be
more performant, but the differences are
not typically significant for MythTV on
current gen systems.
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: MySQL Database connection through socket fails for MariaDB 10.6 [ In reply to ]
On 4/12/22 21:53, Gary Buhrmaster wrote:
> On Wed, Apr 13, 2022 at 2:19 AM David Engel <david@istwok.net> wrote:
>
>> Commenting out the bind-address line has always worked for me. Oddly,
>> the default value is an empty string but I don't see behavior for that
>> officially documented anywhere.
>
> The default for mysql is the equivalent of
> bind-address=* (accept any ipv4/ipv6) per
> https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_bind_address
>
> The default for mariadb is actually empty,
> which means it also listens on all ipv4/ipv6
> addresses per:
> https://mariadb.com/kb/en/server-system-variables/#bind_address
>
>> Seeing as how MariaDB is the de facto "MySQL" on most (all?) other
>> distros not named Ubuntu, my feeling is it should officially be
>> supported too.
>
> Which, arguably, means mythtv packaging
> should not set any bind-address and let all
> supported DB servers listen on all (available)
> addresses by default (as long as the mythtv
> setup creates appropriately secure user
> passwords).

Looking at the configurations from my Ubuntu mysql installation,
/etc/mysql/my.cnf->/etc/alternatives/my.cnf->mysql.cnf which ends
with:

!includedir /etc/mysql/conf.d/
!incudedir /etc/mysql/mysql.conf.d/

at the bottom. The the mysql-server package provides mysql.conf.d/mysqld.cnf,
which has:

bind-address = 127.0.0.1

(I think it really in mysql-common that provides the .cnf files)

Removing the MythTV packaging bind-address would guarantee local
connections only. I've commented on the forum and -users in the
past that users shouldn't change the above because the package
manager can, and has, released new .cnf versions. If I recall, it
happened after an upgrade of the distribution. A warning is issued
and the user must accept the package managers versions, see a diff
of the new/existing or keep the old. I don't know how many folks know what
what to do at that point. Some have kept the package manager's version
and lost any of their local modifications.

I think the solution is:

diff --git a/deb/debian/mythtv-database.postinst b/deb/debian/mythtv-database.postinst
index 11c2287..7f0f5af 100644
--- a/deb/debian/mythtv-database.postinst
+++ b/deb/debian/mythtv-database.postinst
@@ -67,7 +67,7 @@ case "$1" in
#Fixup mysql binding ipv6-compatibility config-update when public_bind was in use (hint from preinst)
if [ -f "${MYSQLCONFIG}" ]; then
if [ -f "${MYSQLCONFIGUPDATEHINT}" ]; then
- sed -i -e 's/^#bind-address=::$/bind-address=::/' ${MYSQLCONFIG}
+ sed -i -e 's/^#bind-address=*$/bind-address=*/' ${MYSQLCONFIG}
rm ${MYSQLCONFIGUPDATEHINT}
fi
fi
diff --git a/deb/debian/mythtv.cnf b/deb/debian/mythtv.cnf
index df2e7d3..8d7e4f2 100644
--- a/deb/debian/mythtv.cnf
+++ b/deb/debian/mythtv.cnf
@@ -1,3 +1,3 @@
[mysqld]
-#bind-address=::
+#bind-address=*
max_connections=100

But I don't know how to test it without pushing the above. Comments welcome.

> Yes, connecting via a local socket can be
> more performant, but the differences are
> not typically significant for MythTV on

--
Bill
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: MySQL Database connection through socket fails for MariaDB 10.6 [ In reply to ]
On Wed, Apr 13, 2022 at 3:42 AM Bill Meek <keemllib@gmail.com> wrote:

> I think the solution is:

The actual solution is to open a release blocker
(or freeze exception) against 22.04 and require
the package not override the vendors default
choices (if the packager thinks that they are
smarter than the vendor, they can offer an optional
package that provides the packagers choices
in an /etc/my.cnf.d/ file that can be masked).
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: MySQL Database connection through socket fails for MariaDB 10.6 [ In reply to ]
On Wed, Apr 13, 2022 at 6:00 AM Gary Buhrmaster <gary.buhrmaster@gmail.com>
wrote:

> On Wed, Apr 13, 2022 at 3:42 AM Bill Meek <keemllib@gmail.com> wrote:
>
> > I think the solution is:
>
> The actual solution is to open a release blocker
> (or freeze exception) against 22.04 and require
> the package not override the vendors default
> choices (if the packager thinks that they are
> smarter than the vendor, they can offer an optional
> package that provides the packagers choices
> in an /etc/my.cnf.d/ file that can be masked).
>
>
I wouldn't act so drastically.
On Ubuntu, the MythTV installation with MySQL still works
without changes of the deb package.
The MythTV/MariaDB combo works as well, but defaults to
local access, only.
This is because of the parsing hierarchy of MariaDBs conf files:
According mariadb.cnf in Ubuntu:
The MariaDB/MySQL tools read configuration files in the following order:
1. "/etc/mysql/mariadb.cnf" (this file) to set global defaults,
2. "/etc/mysql/conf.d/*.cnf" to set global options.
3. "/etc/mysql/mariadb.conf.d/*.cnf" to set MariaDB-only options.
4. "~/.my.cnf" to set user-specific options.

The file /etc/mysql/mariadb.conf.d/50-server.cnf sets the
(final) bind-address value:
bind-address = 127.0.0.1
See
$ sudo grep -r -i 'bind-address' /etc/mysql
/etc/mysql/conf.d/mythtv.cnf:bind-address=::
/etc/mysql/mariadb.conf.d/50-server.cnf:bind-address = 127.0.0.1
/etc/mysql/mariadb.conf.d/60-galera.cnf:#bind-address = 0.0.0.0


As i said before, this only happens if the user had manually
configured MariaDB to allow remote access and does an upgrade.
If one wants options dedicated to MythTV, he needs to create a file
"/etc/mysql/mariadb.conf.d/80-mythtv.cnf" or symlink this file to
"/etc/mysql/conf.d/mythtv.cnf".

I propose to fix the bind-address like Bill proposed
and add an extra check for the existence of the
"/etc/mysql/mariadb.conf.d/" folder. If this folder
exists, create a symlink as described above.

This could be targeted to the v33 release of MythTV.

I can test these changes locally by building deb packages in
a chroot environment.

I opened this discussion mainly to point out, that we need to
fix the documentation and warn the user in case he updates
to MariaDB 10.6 or to Ubuntu 22.04 with MythTV/MariaDB and
uses remote frontends.

HTH,
Roland
Re: MySQL Database connection through socket fails for MariaDB 10.6 [ In reply to ]
On 04/12/2022 04:54 PM, Roland Ernst wrote:
>
> On Tue, Apr 12, 2022 at 2:25 PM Michael T. Dean wrote:
>
>> On 04/09/2022 01:55 PM, Roland Ernst wrote:
>>> Why does a connection from mythtv to the database via socket fail
>>> if the bind-address is not properly configured in MariaDB?
>>
>> This was almost definitely due to how you specified your MythTV
>> database
>> configuration.
>>
>> MythTV makes some assumptions, based on what the user-specified
>> database
>> configuration says, about how to connect to the database. It "always"
>> prefers to use socket/shared-memory connections since they're faster,
>> unless the user specifies something that implies they explicitly
>> want to
>> use TCP/IP connections.
>>
>> Specifically, if the database port is 0 (flag saying use MySQL
>> default)
>> or 3306 (MySQL default) and the DB host name is 127.0.0.1, it will
>> ignore the specified-as-an-IP-address host name and use localhost for
>> the DB host name and connect using sockets/shared memory. Thus, the
>> "always" is only true with IPv4.
>>
>> https://github.com/MythTV/mythtv/blob/master/mythtv/libs/libmythbase/mythdbcon.cpp#L159
>>
>> It's probably now time to update that conditional to take into
>> account
>> the IPv6 equivalents of 127.0.0.1 (::1, 0:0:0:0:0:0:0:1, ...?). One
>> could probably even make an argument for handling 0.0.0.0 (and :: or
>> 0:0:0:0:0:0:0:0), too, though it seems it's never been an issue so
>> far--or at least not enough of one to have caused much discussion.
>
> I do not - fully - agree.
> The configuration of MythTV worked for MariaDB 10.5, but does not work
> in 10.6.
> Before MythTV actually tries to connect to the database,
> it checks if a QTcpSocket can be established on the host ('localhost')
> and the given port.

So, if you're saying that your MythTV database configuration actually
did specify either localhost or 127.0.0.1 for the DB host name and
either port 0 or 3306 for the DB port, then MythTV should not even be
"pinging" MySQL on the port because MythTV/the MySQL drivers are not
even going to use a TCP/IP connection.

It looks like the PortChecker code block at

https://github.com/MythTV/mythtv/blob/master/mythtv/libs/libmythbase/mythdbcon.cpp#L149

that was added in

https://github.com/MythTV/mythtv/commit/d8e5e0f9de78fe8969d08b3372e1f24566860116

should be moved below the "prefer using the faster localhost connection"
code block at

https://github.com/MythTV/mythtv/blob/master/mythtv/libs/libmythbase/mythdbcon.cpp#L159

and updated to only check the network port if we're not using localhost
Unix socket/shared memory connections--only check the network port if
we're using a TCP/IP network connection.

In other words, the answer to what I read as your initial question, "Why
does MythTV fail to start when MySQL networking is
disabled/misconfigured but Unix socket connections work?" is that the
new PortChecker code doesn't acknowledge that we may be using Unix
sockets/shared memory and requires MySQL to be configured to allow (and
have properly configured) networking.

Mike
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: MySQL Database connection through socket fails for MariaDB 10.6 [ In reply to ]
On Thu, Apr 14, 2022 at 1:29 PM Michael T. Dean <mtdean@thirdcontact.com>
wrote:

>
> > I do not - fully - agree.
> > The configuration of MythTV worked for MariaDB 10.5, but does not work
> > in 10.6.
> > Before MythTV actually tries to connect to the database,
> > it checks if a QTcpSocket can be established on the host ('localhost')
> > and the given port.
>
> So, if you're saying that your MythTV database configuration actually
> did specify either localhost or 127.0.0.1 for the DB host name and
> either port 0 or 3306 for the DB port, then MythTV should not even be
> "pinging" MySQL on the port because MythTV/the MySQL drivers are not
> even going to use a TCP/IP connection.
>

Yes, that is what I assumed and how I configured MythTV.


> It looks like the PortChecker code block at
>
>
> https://github.com/MythTV/mythtv/blob/master/mythtv/libs/libmythbase/mythdbcon.cpp#L149
>
> that was added in
>
>
> https://github.com/MythTV/mythtv/commit/d8e5e0f9de78fe8969d08b3372e1f24566860116
>
> should be moved below the "prefer using the faster localhost connection"
> code block at
>
>
> https://github.com/MythTV/mythtv/blob/master/mythtv/libs/libmythbase/mythdbcon.cpp#L159
>
> and updated to only check the network port if we're not using localhost
> Unix socket/shared memory connections--only check the network port if
> we're using a TCP/IP network connection.
>
> In other words, the answer to what I read as your initial question, "Why
> does MythTV fail to start when MySQL networking is
> disabled/misconfigured but Unix socket connections work?" is that the
> new PortChecker code doesn't acknowledge that we may be using Unix
> sockets/shared memory and requires MySQL to be configured to allow (and
> have properly configured) networking.
>
> Mike
>
>
Mike,
Thank you for your explanation and your time spent to answer this.
My conclusion is that MythTV still needs the TCP/IP connection to the SQL
server
for other services, like the Bindings, MythWeb etc. .
But the log messages
"[I] Start up testing connections. DB localhost, BE , attempt 0, status
dbAwake, Delay: 2000"
"[C] (FindDatabase) FindDatabase() - failed"
and the exit of MythTV led me to the wrong direction.
I thought that I had miss-configured MythTV, not MySQL/MariaDB.
IMHO, there is some room for improvements, at least for the logging.

Roland