[mythtv-users] database access

backuppc at sundquist.imapmail.org backuppc at sundquist.imapmail.org
Fri Mar 6 03:54:08 UTC 2009


On Thu, 05 Mar 2009 21:58:17 -0500, backuppc at sundquist.imapmail.org
said:

> So I am still stuck.  I appreciate the suggestions, though.
> 
> Jon S.

Well, I got it to work, but what I did I shouldn't have to do, is a
kludge, and/or is a security risk.

I poured over /usr/share/perl5/MythTV.pm

and found these lines:

# Read the mysql.txt file in use by MythTV.  It could be in a couple
places,
# so try the usual suspects in the same order that mythtv does in
# libs/libmyth/mythcontext.cpp
    our %mysql_conf = ('hostname' => hostname,
                       'db_host'  => 'localhost',
                       'db_port'  => '',
                       'db_user'  => 'mythtv',
                       'db_pass'  => 'mythtv',
                       'db_name'  => 'mythconverg',
                       'upnp_pin' => '',
                      );

-----------------

This is around line 255.  This line seems to be setting the db_pass to
'mythtv' which isn't the password.  I've never edited this file, so why
is this in here?  I don't know perl, but it seems like it is looking for
mysql.txt config file like it is supposed to, but doesn't use the
password in that file, but rather the one from this line in the perl
module.

So I just edited in the actual password, and now nuvexport,
optimize_mythdb.pl and other scripts calling MythTV.pm work.  But this
is just a kludge at best.

Note:

user at mythtv:~$ ls -la `locate mysql.txt`
-rw-r--r-- 1 root     root     78 2008-10-04 20:05 /etc/mythtv/mysql.txt
lrwxrwxrwx 1 user user 21 2008-12-30 17:28 /home/user/.mythtv/mysql.txt
-> /etc/mythtv/mysql.txt
lrwxrwxrwx 1 mythtv   root     21 2008-10-04 20:05
/home/mythtv/.mythtv/mysql.txt -> /etc/mythtv/mysql.txt
lrwxrwxrwx 1 root     root     21 2008-10-04 19:53
/usr/share/mythtv/mysql.txt -> /etc/mythtv/mysql.txt

so I have the config files in the correct/usual spots so they should be
found, right?

Any reason why the config file can't be found.  If it is found and not
used, that would be a bug in MythTV.pm, but nobody else has that problem
?!

Jon S.

P.S. Mythweb still gives me a blank page, though :(
Tricks like http://www.gossamer-threads.com/lists/mythtv/users/116778
don't fix that, either.  But that's a problem for another day.




More information about the mythtv-users mailing list