[mythtv-users] How to control database settings from config.xml

Göran Uddeborg goeran at uddeborg.se
Thu Dec 22 21:18:27 UTC 2011


Thanks a lot for your reply.  I have some follow-up comments if you
have the time.

Michael T. Dean:
> On 12/21/2011 04:51 PM, Göran Uddeborg wrote:
> > According to http://code.mythtv.org/trac/ticket/10209#comment:1 it
> > should be possible to use config.xml mysql.txt.  I'm trying to do
> > that, but it fails.

> How many systems do you have (systems running mythbackend and systems 
> running mythfrontend)?  Which system is this that's not connecting?

I have one dedicated "myth box" (host name "pluto").  It runs both the
only backend and a frontend.  It is equipped with a DVB receiver card,
and it displays on a traditional TV (CRT).  This machine does indeed
work fine.

Now I'm trying to connect from two other machines (host names "mimmi"
and "freddi"); all purpose desktop machines.  These will only run the
frontend, and connect to the backend on the "myth box".

I have changed the configuration so the backend uses the external IP
address rather than 127.0.0.1, and I've done the "grant" in MySQL to
allow connections from the local network.  (And the dedicated box
still works fine! :-)

> If that's the case, you definitely need a:
> 
> <SecurityPin>YOURPIN</SecurityPin>
> 
> element in your config.xml (a child of the <DefaultBackend> element).  
> In it, you would put the PIN value you specified in mythtv-setup for:

I tried that, but it doesn't seem to make any difference.  Or at least
it is not enough to fix things.  If I do that and remove mysql.txt,
(rename it with a #-sign at the beginning) I come to the setup screen
instead.  If I put the mysql.txt file back, I get to the normal start
screen again.  Just as without the pin.  I attach the log output and
the new config.xml at the end.

(I kept the compatibility link in /home in both cases in this
experiment.  To be sure I changed only this parameter.)

> As far as the .config/Trolltech.conf issue goes,

Are you quite sure this is only an upstreams issue?  I tried a couple
of standard KDE programs (ktux, kid3) and they all looked up
~/.config/Trolltech.conf with the correct path.

> I'm guessing there are few users (and fewer 
> developers) who have tried HOME directories with UTF-8 characters.

I would believe so, yes.

> You 
> should probably also attach both of the Trolltech.conf files that are 
> created

Now I'm getting confused.  I can't see ANY Trolltech.conf file being
created in the trace, let alone two.  It tries to find a
Trolltech.conf file using a mangled path to my home directory, but it
never creates any from what I can see.

If I remove ~/.config/Trolltech.conf and then run mythfrontend, there
still isn't any ~/.config/Trolltech.conf after I close mythfrontend.
(If I run e.g. ktux, it is created, though.)

The path to Trolltech.conf is mangled in a different way than the path
to mysql.txt.  The mysql.txt is searched with my UTF-8 o-diaeresis
replaced with a Latin-1 o-diaeresis.  Trolltech.conf is searched with
a path where the o-diaeresis is simply removed.  I've been testing
with a compatibility link for the mysql.txt variant, but none of the
tests has been done with any link for the Trolltech.conf variant.

================ config.xml ================
<Configuration>
  <UPnP>
    <UDN>
      <MediaRenderer>0a46441b-e51d-4236-a2ef-50266f06bb60</MediaRenderer>
    </UDN>
    <MythFrontend>
      <DefaultBackend>
        <SecurityPin>1265</SecurityPin>
        <DBHostName>pluto</DBHostName>
        <DBUserName>mythtv</DBUserName>
        <DBPassword>mythtv</DBPassword>
        <DBName>mythconverg</DBName>
        <DBPort>0</DBPort>
      </DefaultBackend>
    </MythFrontend>
  </UPnP>
</Configuration>

================ mythfrontend output without mysql.txt ================
2011-12-22 21:28:45.101 mythfrontend version:  [0.24.1-5.fc16 (e89d6a9f7e)] www.mythtv.org
2011-12-22 21:28:45.101 Using runtime prefix = /usr
2011-12-22 21:28:45.102 Using configuration directory = /home/göran/.mythtv
2011-12-22 21:28:45.103 ThreadPool:HTTP: Initial 1, Max 25, Timeout 60000
2011-12-22 21:28:48.360 Unable to read configuration file mysql.txt
2011-12-22 21:28:48.360 Empty LocalHostName.
2011-12-22 21:28:48.361 Using localhost value of mimmi
2011-12-22 21:28:48.390 New DB connection, total: 1
2011-12-22 21:28:48.739 Unable to connect to database!
2011-12-22 21:28:48.739 Driver error was [1/1045]:
QMYSQL: Unable to connect
Database error was:
Access denied for user 'mythtv'@'localhost' (using password: NO)

................................................................................
2011-12-22 21:28:50.984 UPnPautoconf() - No UPnP backends found
2011-12-22 21:28:50.984 No UPnP backends found
2011-12-22 21:28:50.996 Could not find theme:  - Switching to Terra
2011-12-22 21:28:51.034 Desktop video mode: 1600x1200 75.000 Hz
2011-12-22 21:28:51.160 get_ip: Namn eller tjänst okänd
2011-12-22 21:28:51.160 LIRC, Error: Failed to parse IP address ''
2011-12-22 21:28:51.160 JoystickMenuThread: Joystick disabled - Failed to read /home/göran/.mythtv/joystickmenurc
2011-12-22 21:28:51.176 Using Frameless Window
2011-12-22 21:28:51.176 Using Full Screen Window
2011-12-22 21:28:51.199 Using the Qt painter
2011-12-22 21:28:51.202 Removing stale cache dir: /home/göran/.mythtv/themecache/MythCenter-wide.1920.1200
2011-12-22 21:28:53.352 No locale defaults file for sv_SE, skipping
2011-12-22 21:28:53.353 System Locale (sv_SE), Country (SE), Language (sv)
2011-12-22 21:28:55.366 Loading en_us translation for module mythfrontend
2011-12-22 21:28:56.811 User cancelled database configuration
2011-12-22 21:28:56.823 Failed to init MythContext, exiting.
2011-12-22 21:28:56.824 Deleting UPnP client...


More information about the mythtv-users mailing list