<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Apr 14, 2022 at 1:29 PM Michael T. Dean <<a href="mailto:mtdean@thirdcontact.com">mtdean@thirdcontact.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
> I do not - fully - agree.<br>
> The configuration of MythTV worked for MariaDB 10.5, but does not work<br>
> in 10.6.<br>
> Before MythTV actually tries to connect to the database,<br>
> it checks if a QTcpSocket can be established on the host ('localhost')<br>
> and the given port.<br>
<br>
So, if you're saying that your MythTV database configuration actually <br>
did specify either localhost or 127.0.0.1 for the DB host name and <br>
either port 0 or 3306 for the DB port, then MythTV should not even be <br>
"pinging" MySQL on the port because MythTV/the MySQL drivers are not <br>
even going to use a TCP/IP connection.<br></blockquote><div><br></div><div>Yes, that is what I assumed and how I configured MythTV. <br></div><div></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
It looks like the PortChecker code block at<br>
<br>
<a href="https://github.com/MythTV/mythtv/blob/master/mythtv/libs/libmythbase/mythdbcon.cpp#L149" rel="noreferrer" target="_blank">https://github.com/MythTV/mythtv/blob/master/mythtv/libs/libmythbase/mythdbcon.cpp#L149</a><br>
<br>
that was added in<br>
<br>
<a href="https://github.com/MythTV/mythtv/commit/d8e5e0f9de78fe8969d08b3372e1f24566860116" rel="noreferrer" target="_blank">https://github.com/MythTV/mythtv/commit/d8e5e0f9de78fe8969d08b3372e1f24566860116</a><br>
<br>
should be moved below the "prefer using the faster localhost connection" <br>
code block at<br>
<br>
<a href="https://github.com/MythTV/mythtv/blob/master/mythtv/libs/libmythbase/mythdbcon.cpp#L159" rel="noreferrer" target="_blank">https://github.com/MythTV/mythtv/blob/master/mythtv/libs/libmythbase/mythdbcon.cpp#L159</a><br>
<br>
and updated to only check the network port if we're not using localhost <br>
Unix socket/shared memory connections--only check the network port if <br>
we're using a TCP/IP network connection.<br>
<br>
In other words, the answer to what I read as your initial question, "Why <br>
does MythTV fail to start when MySQL networking is <br>
disabled/misconfigured but Unix socket connections work?" is that the <br>
new PortChecker code doesn't acknowledge that we may be using Unix <br>
sockets/shared memory and requires MySQL to be configured to allow (and <br>
have properly configured) networking.<br>
<br>
Mike<br><br></blockquote><div><br></div><div>Mike,<br></div><div>Thank you for your explanation and your time spent to answer this.<br></div><div>My conclusion is that MythTV still needs the TCP/IP connection to the SQL server</div><div>for other services, like the Bindings, MythWeb etc. .<br></div><div>But the log messages</div><div><span style="font-family:monospace">"[I] Start up testing connections. DB localhost, BE , attempt 0, status dbAwake, Delay: 2000"</span></div><div><span style="font-family:monospace">"[C] (FindDatabase) FindDatabase() - failed"</span></div><div><span style="font-family:monospace"><span style="font-family:arial,sans-serif"> and the exit of MythTV led me to the wrong direction.</span></span></div><div><span style="font-family:monospace"><span style="font-family:arial,sans-serif">I thought that I had miss-configured MythTV, not MySQL/MariaDB.</span></span></div><div><span style="font-family:monospace"><span style="font-family:arial,sans-serif">IMHO, there is some room for improvements, at least for the logging.</span></span></div><div><span style="font-family:monospace"><span style="font-family:arial,sans-serif"><br></span></span></div><div><span style="font-family:monospace"><span style="font-family:arial,sans-serif">Roland<br></span></span></div></div></div>