[mythtv-users] Problem Connecting To Database

Tom Purl tom at tompurl.com
Sun Nov 12 15:39:44 UTC 2006


Hi, I used to run a mythtv 0.20 system on Ubuntu, but I recently
switched to Gentoo.  After setting everything up and installing
mythtv, I ran the following command to restore my old DB:

    mysql -u root -h localhost < /home/foo/backups/mythdb_061102.bak

I then added the 'mythtv' user to mysql (5.0.26-log) by using the
following command from the mysql prompt:

    grant all on mythdb.* to 'mythtv'@'localhost' identified by 'somepass';

I can then log into mysql as the mythtv user and create a test table,
proving that I have the proper security access. 

I also have a mysql.txt file in the following directories:

-rwxr----- 1 mythtv root 957 Nov 12 08:28 /etc/mythtv/mysql.txt
-rwxrw---- 1 foo    foo  957 Sep 23 09:09 /home/foo/.mythtv/mysql.txt

In tha tfile, I have the following text:

    DBHostName=localhost
    DBUserName=mythtv
    DBPassword=somepass
    DBName=mythdb
    DBType=QMYSQL3

Here's my problem:  when I try and start mythbackend 
(sudo /etc/init.d/mythbackend start) , I get the following error messasge 
in /var/log/mythtv/mythbackend.log:

    QSqlQuery::exec: database not open
    QSqlQuery::exec: database not open

mysql is running, so I don't understand why I'm getting this error.
Can anyone else see why this may be happening?

Thanks a ton in advance!

Tom Purl


More information about the mythtv-users mailing list