[mythtv-users] Need help with mysql privileges, I think

Craig Huff huffcslists at gmail.com
Tue Dec 7 01:31:30 UTC 2010


I have set up a job to run mythfilldatabase when the backend boots up.
It first checks to see if the current time is near or past the time
suggested in the log from the last run of mythfilldatabase for the
next run to occur.

I notice the following errors each time mythfilldatabase gets run:
<snippet>
2010-12-06 05:51:00.881 Using runtime prefix = /usr
2010-12-06 05:51:00.881 Using configuration directory = /.mythtv
2010-12-06 05:51:00.902 Unable to read configuration file mysql.txt
2010-12-06 05:51:00.902 Empty LocalHostName.
2010-12-06 05:51:00.902 Using localhost value of backendhostname
2010-12-06 05:51:00.910 New DB connection, total: 1
2010-12-06 05:51:00.913 Unable to connect to database!
2010-12-06 05:51:00.913 Driver error was [1/1045]:
QMYSQL: Unable to connect
Database error was:
Access denied for user 'mythtv'@'localhost' (using password: YES)


2010-12-06 05:51:01.579 UPnPautoconf() - Found one UPnP backend
2010-12-06 05:51:01.691 Closing DB connection named 'DBManager0'
2010-12-06 05:51:01.691 Connected to database 'mythconverg' at host: localhost
2010-12-06 05:51:01.691 Closing DB connection named 'DBManager0'
2010-12-06 05:51:01.692 Deleting UPnP client...
2010-12-06 05:51:02.437 Connected to database 'mythconverg' at host: localhost
2010-12-06 05:51:02.446 Current MythTV Schema Version (DBSchemaVer): 1254
2010-12-06 05:51:02.450 New DB connection, total: 2
2010-12-06 05:51:02.450 Connected to database 'mythconverg' at host: localhost
</snippet>

As this shows, the attempt to access via localhost fails, but then it
goes on to connect and do the update anyway (via UPnP?  via out and
back on eth0 instead of lo?).

My skills with mysql are limited and all I have been able to dig up is
the following:
<snippet>
mysql> show grants for mythtv;
+-------------------------------------------------------------------------------------------------------+
| Grants for mythtv@%
                                 |
+-------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'mythtv'@'%' IDENTIFIED BY PASSWORD
'*41E53B86C5F668CC1C5B2A44457C8692EC3DA046' |
| GRANT ALL PRIVILEGES ON `mythconverg`.* TO 'mythtv'@'%'
                                 |
+-------------------------------------------------------------------------------------------------------+
</snippet>

I suspect that I need to grant usage to mythtv at localhost, but I
haven't been able to figure out how, even after checking on the
mythtv.org wiki.

Am I correct or am I barking up the wrong tree?  If I'm right, how do
I get it done?

(BTW, I tried the following with no success:
<snippet>
mysql> connect mythconverg;
Connection id:    1869
Current database: mythconverg
mysql> grant all privileges on *.* to 'mythtv'@'localhost' with grant option;
Query OK, 0 rows affected (0.00 sec)
mysql> GRANT ALL PRIVILEGES ON *.* TO 'mythtv'@'localhost'
    -> IDENTIFIED BY 'mythtv' WITH GRANT OPTION;
Query OK, 0 rows affected (0.04 sec)
</snippet>
)


Any help would be appreciated.

Craig.


More information about the mythtv-users mailing list