[mythtv-users] Ver 31 frontend cannot connect to the database

Stephen Worthington stephen_agent at jsw.gen.nz
Wed Nov 25 12:43:16 UTC 2020


On Tue, 24 Nov 2020 19:05:07 -0800, you wrote:

>
>On 11/24/20 6:38 PM, Stephen Worthington wrote:
>> On Tue, 24 Nov 2020 12:12:20 -0600, you wrote:
>>
>>> If it truly does work, then the change shouldn't be made in a
>>> .cnf file that will be overwritten by a package manager. That
>>> could happen at any time, for example 2 years from now when
>>> you upgrade to a new distribution. And will have forgotten
>>> about the change. Changes like this should go in the same
>>> place the bind-address was changed. Just before or after it
>>> would be OK.
>>>
>>> But: your computer, your choice.
>> There is no need to fear a config file being overwritten by a package
>> update without notice.  There is notice.  If a package is going to
>> overwrite a file that has been modified, it will pause and ask you
>> what you want to do about the differences between the modified file
>> and the new version.  You are given the option of keeping your
>> modified version, installing the new package version, or doing a diff
>> to see what the problem is.  If you choose to keep your modified
>> version, a copy of the new version from the package manager gets put
>> in place with a .dpkg-dist extension added, so you can go back later
>> and manually apply any changes in the new version.  If you choose to
>> install the new package version, the old modified version is kept by
>> renaming it to add a .dpkg-old extension, so you can come back later
>> and re-modify the new version if necessary.  While package
>> installation is paused for you to make a choice, the new version of
>> the file is put in place but with a .dpkg-new extension, so that you
>> can do diffs and merge things between it and your modified version,
>> and then choose to keep your modified version.  All of that process
>> works pretty well - the only problem I have with it is when doing a
>> full upgrade of the system (eg from 18.04 to 20.04) where I always
>> have a number of packages where there are modified files and I have to
>> keep on coming back to the PC to check for it having paused on the
>> next one.
>
>Does that mean that moving the config file to /etc/mysql/conf.d is
>merely unnecessary or is there a reason to not do it? I'll figure out
>later what the proper permissions for such a file/directly should be.
>Right now they are at 777.
>
>mike

If you move a file created by a package, the next update of that
package will replace the file in the old directory, and you will not
get any notice that it has happened.  If that file contains an
uncommented bind-address line, that would not be good.  MythTV creates
its mythtv.cnf file in the correct directory for MySQL, but I believe
it is the wrong directory when using MariaDB.  So if you want to add
options that are going to override all other prior options, you
probably want to do that in a new file you create that is in the last
directory that is read for configuration files, and is named so that
it is the last config file read from that directory.  So a good name
might look like:

zz-myoptions.cnf

But working out exactly what order the directories are read in is
difficult.  If you do:

cd /etc/mysql
grep -ir includedir *

you can then see all the !includedir lines that include directories.
But you will also need to look at the MariaDB documentation to find
out which *.cnf file(s) it reads directly in what order before you can
work it all out.  If you are lucky the documentation will spell it all
out.


More information about the mythtv-users mailing list