[mythtv-users] Updates changing /etc/mysql/conf.d/mythtv.cnf bind-addr setting

Stephen Worthington stephen_agent at jsw.gen.nz
Thu Nov 5 01:44:11 UTC 2015


On Wed, 4 Nov 2015 12:39:22 -0500, you wrote:

>Hi there,
>I'm on mythbuntu 14.4 LTS with .28 updates.
>
>It's been working wonderfully, but the last two times I've accepted updates
>the mysql config has been changed in  /etc/mysql/conf.d/mythtv.cnf
>
>The main impact is that the bind-addr setting is commented out and
>mythfrontend can't connect.
>
>The first time it took me a while to figure out what happened, and the
>second time it was an easy fix.
>
>Am I supposed to be putting that setting somewhere else so that it doesn't
>get whomped on update?
>
>Cheers,
>Andrew

I am on 0.27-fixes, and my /etc/mysql/conf.d/mythtv.cnf file has never
been overwritten in an update, so it must be something only the 0.28
updates are doing.

The options in the mysqld *.cnf files are read in order.  Except for
the --user option, where there are multiple settings for the same one,
the last one read is used.  At the end of the /etc/mysql/my.cnf file,
all the *.cnf files in /etc/mysql/conf.d are read in an include-dir
option.  So if you want to override any options read in earlier files
like /etc/mysql/conf.d/mythtv.cnf, you need to create a new *.conf
file whose name is later in the collating order than mythtv.conf.  I
have one called mythtv-tweaks.cnf (for the recommended settings to
tweak database performance), and another called mythtv-tweaks-jsw.cnf,
where I put personal tweaks.  The latter also has my bind-address
line, as well as in /etc/mysql/conf.d/mythtv.cnf.

If creating a new *.cnf file, be aware that it will be ignored if it
has the wrong permissions.  This is what mine look like:

root at mypvr:/etc/mysql/conf.d# ll
total 24
drwxr-xr-x 2 root root 4096 Nov  3 16:15 ./
drwxr-xr-x 3 root root 4096 Oct 27 22:38 ../
-rw-r--r-- 1 root root    0 Jul 17  2014 .keepme
-rw-r--r-- 1 root root   21 Mar 30  2012 mysqld_safe_syslog.cnf
-rw-r--r-- 1 root root   30 Nov  3 16:15 mythtv.cnf
-rw-r--r-- 1 root root  368 Aug 26  2012 mythtv-tweaks.cnf
-rw-r--r-- 1 root root 1440 Oct  4  2013 mythtv-tweaks-jsw.cnf


More information about the mythtv-users mailing list