[mythtvnz] Frontend will not connect to database...

Nick Wallingford nick at wallingford.nz
Sat Oct 31 04:47:54 GMT 2015



On 31/10/15 15:45, Stephen Worthington wrote:
> On Sat, 31 Oct 2015 12:45:27 +1300, you wrote:
>
>> Ubuntu 14.04
>> mythtv 0.27
>>
>> Combined FE and BE (ie, same PC) but specifying fixed IP in setup for
>> the BE and in config.xml for the FE.
>>
>> mysql seems OK - I can connect to the mythconverge as user mythtv
>> backend seems OK - it runs normally, with no abnormal errors in logs.
>>
>> But the frontend refuses to load, with the error:
>>
>> Connection to master server timed out. Either the server is down or the
>> master server settings in mythtv-settings does not contain the proper IP
>> address.
>> No address defined for host: localhost
>>
>> I'm not sure why it should be trying to use localhost - that point of
>> failure is, near as I understand, when the frontend is making the
>> initial contact with the DB using the config.xml information (and then
>> it gets all the other config stuff from the DB???)
>>
>> Anyone willing to give me some help before TV time starts later today???
>>
>> Nick Wallingford
>> Tauranga
>
> Is this Mythbuntu 14.04?  If so, then first check that mysql is bound
> to all IP addresses.  In my setup, that is done in
> /etc/mysql/conf.d/mythtv.cnf which looks like this:
>
> [mysqld]
> bind-address=0.0.0.0
>
> and in /etc/mysql/my.cnf the bind line is commented out by putting a #
> character at the front of it.
>
> If you do:
>
>    cd /etc/mysql
>    grep -ir bind *
>
> you should see all the bind settings:
>
> root at mypvr:/etc/mysql# grep -ir bind *
> conf.d/mythtv.cnf:bind-address=0.0.0.0
> conf.d/mythtv-tweaks-jsw.cnf:bind-address=0.0.0.0
> my.cnf:#bind-address            = 127.0.0.1
> my.cnf.original:bind-address            = 127.0.0.1
>
> If you change any settings, restart mysql.  Restarting mysql without
> stopping the backend is safe only if the backend is idle.  It is
> probably better to stop it first, so do this (from a root prompt or
> add sudo):
>
> stop mythtv-backend
> restart mysql
> start mythtv-backend
>
> Then check that the box itself has a static IP address.  And make sure
> what it is set to:
>
> ifconfig
>
> Then check that the static IP address is the one in the
> /etc/mythtv/config.xml file.
>
> Then check the same in any MythTV user directories eg:
>
>    /home/mythtv/.mythtv/config.xml
>    /home/<frontenduser>/.mythtv/config.xml
>
> Then check the MythTV settings for the same IP address in the backend
> and frontend settings.  If you do a mysql query like this you should
> see your backend settings:
>
> mysql> select * from settings where data like '10.0.2.4';
> +-----------------+----------+----------+
> | value           | data     | hostname |
> +-----------------+----------+----------+
> | MasterServerIP  | 10.0.2.4 | NULL     |
> | BackendServerIP | 10.0.2.4 | mypvr    |
> +-----------------+----------+----------+
> 2 rows in set (0.00 sec)
>
> And this will show if you have localhost set anywhere:
>
> mysql> select * from settings where data like '127.%' or data like
> 'localhost';
> Empty set (0.00 sec)
>
> _______________________________________________
> mythtvnz mailing list
> mythtvnz at lists.linuxnut.co.nz
> http://lists.ourshack.com/mailman/listinfo/mythtvnz
> Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/
>

Sorry.  Not mythbuntu but plain vanilla ubuntu with mythtv...

But all you said makes sense nevertheless.  I sort of figured my issues 
were more mysql related rather than mythtv to some extent.

But changing the various bind settings has my BE unable to connect to 
the database.  I think my problems is with the mysql permissions for the 
mythtv user.

   Database error was:
   Access denied for user 'mythtv'@'media' (using password: YES)

Reasonably comfortable with phpmyadmin or mysql command line - what 
should I be looking for for that user?

Thanks for helping - I *generally* manage to blunder my way to a 
solution, but this one has had me stumped for most of the day!

Nick



More information about the mythtvnz mailing list