[mythtv-users] mythtv.cnf file setup for remote frontends

Monkey Pet monkeypet at gmail.com
Sat Feb 8 22:44:47 UTC 2025


On Sat, Feb 8, 2025 at 11:38 AM James Abernathy <jfabernathy at gmail.com>
wrote:

>
>
> On Sat, Feb 8, 2025 at 2:31 PM Bill Meek <keemllib at gmail.com> wrote:
>
>>
>>
>> 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> 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
>> _______________________________________________
>
>
> sudo grep --recursive --extended-regexp "include|bind.address" /etc/mysql
> /etc/mysql/mariadb.conf.d/60-galera.cnf:#bind-address = 0.0.0.0
> /etc/mysql/mariadb.conf.d/50-server.cnf:#bind-address            =
> 127.0.0.1
> /etc/mysql/mariadb.conf.d/mythtv.cnf.original:#bind-address=::
> /etc/mysql/mariadb.conf.d/mythtv.cnf:#bind-address=::
> /etc/mysql/mariadb.conf.d/80-mythtv.cnf:bind-address = *
> /etc/mysql/my.cnf.fallback:!includedir /etc/mysql/conf.d/
> /etc/mysql/mariadb.cnf:!includedir /etc/mysql/conf.d/
> /etc/mysql/mariadb.cnf:!includedir /etc/mysql/mariadb.conf.d/
>
> I commented out the entries:
>
> /etc/mysql/mariadb.conf.d/50-server.cnf:#bind-address            =
> 127.0.0.1
> /etc/mysql/mariadb.conf.d/mythtv.cnf:#bind-address=::
>
> So it must have picked up the 127.0.0.1 entry that was first before it was
> commented out instead of the last which was the one I wanted.
> /etc/mysql/mariadb.conf.d/80-mythtv.cnf:bind-address = *
>

Mine looks like this... but I might have deleted some bind-address lines
entirely instead of commenting it out.. I knew I should have taken notes,
sigh.

root at mythtv2:/etc/mysql# grep -R bind *
mariadb.conf.d/60-galera.cnf:#bind-address = 0.0.0.0
mariadb.conf.d/50-server.cnf:bind-address            = 0.0.0.0


>
> Jim A
>
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20250208/30f71f55/attachment.htm>


More information about the mythtv-users mailing list