[mythtv] MySQL Database connection through socket fails for MariaDB 10.6

Roland Ernst rcrernst at gmail.com
Wed Apr 13 17:34:56 UTC 2022


On Wed, Apr 13, 2022 at 6:00 AM Gary Buhrmaster <gary.buhrmaster at gmail.com>
wrote:

> On Wed, Apr 13, 2022 at 3:42 AM Bill Meek <keemllib at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-dev/attachments/20220413/9bd999e0/attachment.htm>


More information about the mythtv-dev mailing list