[mythtv-users] 'mythtv could not connect to the database' insanity

Michael T. Dean mtdean at thirdcontact.com
Thu Jun 26 10:40:54 UTC 2014


On 06/26/2014 01:40 AM, Douglas Peale wrote:
> On 06/25/2014 10:00 AM, Raymond Wagner wrote:
>> MythTV only stores the password in one of two places.  It stores it 
>> in $MYTHCONFDIR/config.xml, if MYTHCONFDIR is defined, falling back 
>> to $HOME/.mythtv/config.xml otherwise.
>>
> In a quick search, I found the MythTV data base password in three places.
> /etc/mythtv/config.xml
> /etc/apache2/sites-available/mythweb.conf
> ~/.mythtv/config.xml

/etc/mythtv/config.xml and ~/.mythtv/config.xml should be the same place 
(same file), but with a link making it appear in two places.

MythWeb does use a different place, but that's because your web server 
shouldn't have access to either /home/* or /etc.

> In my attempts to get MythTV working I ran into the following 
> combinations:
> I could run mythbackend, but the frontend could not access the database.
> I could run backendsetup, but mythbackend could not access the 
> database, and the frontend failed because the backend was not running.
> I could run the frontend and the backend, but mythweb would not run 
> (I'm not sure this one was database related)
>
> This tells me that the frontend has a different location to get the 
> database password than the backend, and that the backendsetup has a 
> different location to get the database password than the backend.

No, the only difference is the user who ran the applications had 
different HOMEs, so $HOME/.mythtv/config.xml was different.  In other 
words, the environment was different, so you got different results.

Mike


More information about the mythtv-users mailing list