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

Douglas Peale Douglas_Peale at comcast.net
Thu Jun 26 05:40:43 UTC 2014


On 06/25/2014 10:00 AM, Raymond Wagner wrote:
> On 6/25/2014 11:47 AM, Douglas Peale wrote:
>> On 06/25/2014 08:05 AM, Anthony Griffiths wrote:
>>> mysqld is running, and I'm trying to run mythtv-setup on the localhost machine, there's no remote machine involved.
>>>
>>>
>>> On Wed, Jun 25, 2014 at 3:39 PM, Raymond Wagner <raymond at wagnerrp.com <mailto:raymond at wagnerrp.com>> wrote:
>>>
>>>     On 6/25/2014 10:35 AM, Anthony Griffiths wrote:
>>>
>>>         I'm running fedora 20 64 bit and I've installed mythtv twice, once using yum and the second using git and compiling,
>>>         both times I get stuck in an insane loop of 'mythtv could not connect to the database'. And trawling google I see no
>>>         straightforward solution to this which is nuts. How do I get past this stuck point?
>>>         I've tried creating a mysql databae called mythconverg with user tony, and a password but I still get back to this
>>>         loop. I've disabled the firewall but still no joy. This is really frustrating so thanks for any help.
>>>
>>>
>>>     Check your process list to ensure the database server is actually running.  If you've told MythTV to access the database
>>>     from a network accessible address, make sure your database server is actually configured to listen on the network, and
>>>     not just loopback. 
>>>
>> Having just gone through that issue, I'll point you at this thread: https://forum.mythtv.org/viewtopic.php?f=36&t=151
>>
>> Basically, MythTV saves the database password in multiple places. The current install tool does not do a good job of making
>> them all agree. You need to find out what the actual password is and make sure that the backend, the frontend, the
>> backendsetup tool, and mythweb all have that same password.
>
> 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

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.

MythTV was not working after installation.
I did not get everything working until I had explicitly set the database password, created an empty database, restored to it (I
was restoring a data base from a previous setup) and went and edited all of the passwords to match the one I set.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mythtv.org/pipermail/mythtv-users/attachments/20140625/153ed8e9/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 246 bytes
Desc: OpenPGP digital signature
URL: <http://www.mythtv.org/pipermail/mythtv-users/attachments/20140625/153ed8e9/attachment.sig>


More information about the mythtv-users mailing list