[mythtv-users] mythtv.cnf file setup for remote frontends
Bill Meek
keemllib at gmail.com
Sat Feb 8 19:30:23 UTC 2025
On Saturday 08 February 2025 01:06:57 PM (-06:00), James Abernathy wrote:
On Thu, Nov 28, 2024 at 4:22 AM Stephen Worthington <stephen_agent at jsw.gen.nz <mailto:stephen_agent at jsw.gen.nz> > wrote:
On Wed, 27 Nov 2024 21:06:51 -0500, you wrote:
>I'm trying to come up with a set of instructions to avoid all the
>experimenting I did tonight to get a remote frontend to talk to a new
>backend.
>
>What works for me on my production backend I don't understand but it
>works. Any new frontend just has to search for the backend on its
>first run.
>
>On my production backend I run mariadb for my 'mysql' databases. If I
>look at the /etc/mysql directory I have 2 files of interest.
>
>cat conf.d/mythtv.cnf
>------------------------
>[mysqld]
>bind-address=::
>max_connections=100
>
>And
> cat mariadb.conf.d/mythtv.cnf
>---------------------------------
>[mysqld]
>bind-address=*
>max_connections=100
>
>My understanding is that the last bind-address=* found is the one that
>is in effect.
>So in /etc/mysql/mariadb.conf.d/
>
>cat * | grep 'bind-address'
>bind-address = 127.0.0.1
>#bind-address = 0.0.0.0
>bind-address=*
>
>Can I assume that the only .cnf file that matters on a mariadb system
>is the one in mariadb.conf.d directory?
>
>Also it seems that you need to make sure the mythtv.cnf is the last
>one with a bind-address statement determined by a normal search. I've
>seen some name their file 80-mythtv.cnf to force it higher in the
>search.
>
>Also it appears that only bind-address=* works. I've had no luck with
>bind-address=:: or bind-address=0.0.0.0.
>
>Can any exports out there confirm any of this?
>
>Jim A
There is an order that the config files get loaded in, but I believe
it differs between MySQL and MariaDB. And I have never seen any good
documentation on what the order actually is. And it is documented
somewhere that either the first or the last one read will be the one
that is used, but I can never remember which. The only safe thing I
can see to do is to comment out all instances of bind-address except
the one I want it to use, so that is what I have always done.
The bind-address settings of :: and 0.0.0.0 do work, but a few
versions of MySQL and MariaDB ago, what they actually mean was
redefined. So :: now means any IPv6 address, and 0.0.0.0 means any
IPv4 address, and * means any IPv4 or IPv6 address. So it used to be
that you used :: to get any IPv4 or IPv6 address, and now you need to
use * instead.
_______________________________________________
This comment from Stephen back in November nailed it for my problem I brought up today. It didn't take the last bind-address but the first. I'm using mariadb and the solution of removing all bind-address statements except the one you want is the solution.
Thanks Stephen.
JIm A
Jim,
Please post the output of this from the host that was failing:
sudo grep --recursive --extended-regexp "include|bind.address" /etc/mysql
I'm curious as I've never had to comment out everything else.
--
Bill
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20250208/ad506f6b/attachment.htm>
More information about the mythtv-users
mailing list