Strange database connection problem

Have a MythTV related problem? Ask for help from other MythTV users here.

Moderator: Forum Moderators

Post Reply
Posts: 2
Joined: Tue Jan 10, 2017 8:24 pm
Great Britain

Strange database connection problem

Post by Eddles » Tue Jan 10, 2017 9:47 pm

Hi all, I used to use MythTV a long time ago, and am now getting back into it again. This time, I'm trying to set up a standard PC only for the backend and a Raspberry Pi to run the frontend. "mythtv" is the name of the backend bound to the IP address running Debian Jessie, "raspberrypi" is the name of the frontend running raspbian and "voyager" is the name of my main computer not involved with mythtv. Both frontend & backend are using precompiled 0.28 binaries downloaded from the official repositories.

I've set up MythTV on "mythtv", and it seems to be working fine:

Code: Select all

voyager:~ kit$ ssh mythtv@
mythtv@'s password: 
Last login: Tue Jan 10 20:46:22 2017 from raspberrypi
$ ps aux | grep mythbackend
mythtv    2543  0.0  2.8 3912940 58688 ?       Ssl  21:11   0:00 /usr/bin/mythbackend --quiet --syslog local7
mythtv    2583  0.0  0.0   8172  1560 pts/2    S+   21:11   0:00 less mythbackend.log
mythtv    2661  0.0  0.1  12728  2244 pts/1    S+   21:20   0:00 grep mythbackend
Running mythfrontend shows the standard setup wizard and I enter the database address which is as shown in the picture below:
database.jpg (134.27 KiB) Viewed 395 times
This is confirmed in the config.xml file on the frontend:

Code: Select all

Connecting to the mysql server works fine:

Code: Select all

pi@raspberrypi:~ $ mysql -u mythtv -pmythtv -h mythconverg
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 216
Server version: 5.5.53-0+deb8u1 (Debian)

Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

| Tables_in_mythconverg          |
| archiveitems                   |
| bdbookmark                     |
| capturecard                    |
| cardinput                      |
| channel                        |
But when I try to run mythfrontend, it tries to connect to the backend on localhost for some reason, which obviously fails:

Code: Select all

2017-01-10 21:27:53.878835 I  MythCoreContext::ConnectCommandSocket(): Connecting to backend server: (try 1 of 1)
2017-01-10 21:27:53.880004 E  MythSocket(6ac0d140:-1): Failed to connect to ( Connection refused
2017-01-10 21:27:53.880248 E  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
I don't understand why the frontend is trying to connect to and not where the backend is located? I've double checked mythtv-setup on the backend and it shows "" on both fields in the first screen.

Some help would be greatly appreciated!
With kind regards - Eddles

User avatar
Posts: 242
Joined: Wed Sep 03, 2014 9:02 am
Great Britain

Re: Strange database connection problem

Post by dizygotheca » Wed Jan 11, 2017 12:26 am

Is your ping failing ?

Posts: 219
Joined: Sun May 11, 2014 6:23 pm
Great Britain

Re: Strange database connection problem

Post by PhilB » Wed Jan 11, 2017 5:28 pm

There are a number of copies of config.xml.
Frontend uses ~/.mythtv/config.xml (ie under your normal login directory).
Backend uses /home/mythtv/.mythtv/config.xml
Also /etc/mythtv/config.xml which is linked to by the other two entries in some systems.

This is confusing but has flexibility for more complex situations.
Are you looking at ~/.mythtv/config.xml ?


Post Reply