[mythtv-users] database connection just stopped working

backuppc at sundquist.imapmail.org backuppc at sundquist.imapmail.org
Mon Oct 17 03:16:23 UTC 2011


Hi all.  Used to lurk (and sometimes post) here lots back when first
getting set up, but haven't been back for a while because it "just plain
worked" (TM) and "if it ain't broke, don't fix it".

After a couple of years, my pcHDTV 5500 died.  Actually, whole system
froze up, couldn't figure out anything so did a reinstall and it would
freeze up again when scanning for channels with that card.  Took it out
and just went with my HDHR and everything worked great.

Decided to do the mythbuntu 10.04 LTS since this was before 11.11 came
out anyway, and wanted the long term support.  Installation went really
really well (once I took out the pcHDTV).  Was all too easy.

But Thursday night I installed boxee and huludesktop, and something must
have happened, which I just noticed tonight (was busy with "real life"
over the weekend).

Things had been working great, as you can see from the logs...

2011-10-13 20:15:15.259 mythbackend version: branches/release-0-23-fixes
[24158] www.mythtv.org
2011-10-13 20:15:15.266 Using runtime prefix = /usr
2011-10-13 20:15:15.292 Using configuration directory =
/home/mythtv/.mythtv
2011-10-13 20:15:15.352 Empty LocalHostName.
2011-10-13 20:15:15.357 Using localhost value of mythtv
2011-10-13 20:15:15.372 New DB connection, total: 1
2011-10-13 20:15:15.402 Connected to database 'mythconverg' at host:
localhost
2011-10-13 20:15:15.413 Closing DB connection named 'DBManager0'
2011-10-13 20:15:15.452 Connected to database 'mythconverg' at host:
localhost
2011-10-13 20:15:15.459 Current MythTV Schema Version (DBSchemaVer):
1254
2011-10-13 20:15:15.461 ProgramInfo(): Updated pathname '':'' ->
'2171_20111013201408.mpg'
2011-10-13 20:15:15.616 AutoExpire: CalcParams(): Max required Free
Space: 3.0 GB w/freq: 14 min
2011-10-13 20:15:17.934 AFD: Opened codec 0x949c8c0, id(MPEG2VIDEO)
type(Video)
2011-10-13 20:15:17.934 AFD: codec AC3 has 6 channels
2011-10-13 20:15:17.935 AFD: Opened codec 0x949e430, id(AC3) type(Audio)
2011-10-13 20:15:17.936 AFD: codec AC3 has 2 channels
2011-10-13 20:15:17.937 AFD: Opened codec 0x949eb80, id(AC3) type(Audio)
2011-10-13 20:15:18.472 Preview: Grabbed preview
'/var/lib/mythtv/livetv/2171_20111013201408.mpg' 1920x1088 at 64s
2011-10-13 20:15:18.659 ~MythContext waiting for threads to exit.
2011-10-13 20:15:19.399 RecBase(5:5):
GetKeyframePositions(69,9223372036854775807,#1) out of 4
2011-10-13 20:15:19.459 RecBase(5:5):
GetKeyframePositions(69,9223372036854775807,#1) out of 4
2011-10-13 20:15:34.992 MainServer::HandleRecorderQuery() Unknown
encoder: 0
2011-10-13 20:15:58.749 MainServer::HandleRecorderQuery() Unknown
encoder: 0
2011-10-13 20:16:15.652 Expiring 0 MBytes for 2171 @ Thu Oct 13 20:00:00
2011 => Garrow's Law
2011-10-13 20:16:15.654 Expiring 95 MBytes for 2171 @ Thu Oct 13
20:00:00 2011 => Garrow's Law
2011-10-13 20:16:15.655 ProgramInfo(): Updated pathname '':'' ->
'2171_20111013201407.mpg'
2011-10-13 20:16:15.657 ProgramInfo(): Updated pathname '':'' ->
'2171_20111013201408.mpg'
2011-10-13 20:16:15.708 ProgramInfo(): Updated pathname '':'' ->
'2171_20111013201407.mpg'
2011-10-13 20:16:15.710 ProgramInfo(): Updated pathname '':'' ->
'2171_20111013201408.mpg'
2011-10-13 20:16:18.661 ProgramInfo(): Updated pathname '':'' ->
'2171_20111013201407.mpg'
2011-10-13 20:16:22.752 ProgramInfo(): Updated pathname '':'' ->
'2171_20111013201408.mpg'
2011-10-13 20:16:47.687 ProgramInfo(): Updated pathname '':'' ->
'2171_20111013201514.mpg'
2011-10-13 20:16:47.688 TVRec(5): Changing from WatchingLiveTV to None
2011-10-13 20:16:47.735 ProgramInfo(2171_20111013201514.mpg): Recording
designated 1080i/p because width was 1920

Like I said, working fine.  Was also fiddling with the sound parameters
(stereo, 5.1, etc. but that shouldn't affect anything).

Anyway, the next time Mythtv decides to run mythfilldatabase (day after
I had been watching liveTV and also installing boxee and hulu), this
happens:

2011-10-14 15:17:01.957 MainServer::ANN Monitor
2011-10-14 15:17:01.957 adding: mythtv as a client (events: 0)
2011-10-14 15:29:18.336 AutoExpire: CalcParams(): Max required Free
Space: 1.0 GB w/freq: 15 min
2011-10-14 15:44:18.370 AutoExpire: CalcParams(): Max required Free
Space: 1.0 GB w/freq: 15 min
2011-10-14 15:59:18.406 AutoExpire: CalcParams(): Max required Free
Space: 1.0 GB w/freq: 15 min
2011-10-14 16:14:18.439 AutoExpire: CalcParams(): Max required Free
Space: 1.0 GB w/freq: 15 min
2011-10-14 16:17:01.249 MainServer::ANN Monitor
2011-10-14 16:17:01.249 adding: mythtv as a client (events: 0)
2011-10-14 16:27:04.336 Running mythfilldatabase
2011-10-14 16:27:04.479 Using runtime prefix = /usr
2011-10-14 16:27:04.480 Using configuration directory =
/home/mythtv/.mythtv
2011-10-14 16:27:04.480 Unable to read configuration file mysql.txt
2011-10-14 16:27:04.481 Empty LocalHostName.
2011-10-14 16:27:04.481 Using localhost value of mythtv
2011-10-14 16:27:04.522 New DB connection, total: 1
2011-10-14 16:27:04.544 Unable to connect to database!
2011-10-14 16:27:04.545 Driver error was [1/1045]:
QMYSQL: Unable to connect
Database error was:
Access denied for user 'mythtv'@'localhost' (using password: YES)


I've gone through all the database troubleshoots, and it seems things
work fine.  For example:

user at mythtv:~$ mysql -u mythtv -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1035
Server version: 5.1.41-3ubuntu12.10 (Ubuntu)

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

mysql> 

Also, it says can't find mysql.txt, but...

user at mythtv:~$ locate mysql.txt
/etc/mythtv/mysql.txt
/home/user/.mythtv/mysql.txt
/home/mythtv/.mythtv/mysql.txt
/usr/share/mythtv/mysql.txt.dist
user at mythtv:~$ 

and all those files (except the .dist one) are links to the one in /etc:

user at mythtv:~$ for i in `locate mysql.txt`; do file $i; done
/etc/mythtv/mysql.txt: ASCII English text
/home/user/.mythtv/mysql.txt: symbolic link to `/etc/mythtv/mysql.txt'
/home/mythtv/.mythtv/mysql.txt: symbolic link to `/etc/mythtv/mysql.txt'
/usr/share/mythtv/mysql.txt.dist: ASCII text
user at mythtv:~$ 

And this file is readable:

user at mythtv:~$ cat /etc/mythtv/mysql.txt
DBHostName=localhost

# By default, Myth tries to ping the DB host to see if it exists.
# If your DB host or network doesn't accept pings, set this to no:
#
#DBHostPing=no

DBUserName=mythtv
DBPassword=password (<==real password here!)
DBName=mythconverg
DBType=QMYSQL3

# Set the following if you want to use something other than this
# machine's real hostname for identifying settings in the database.
# This is useful if your hostname changes often, as otherwise you
# will need to reconfigure mythtv every time.
# NO TWO HOSTS MAY USE THE SAME VALUE
#
#LocalHostName=my-unique-identifier-goes-here

# If you want your frontend to be able to wake your MySQL server
# using WakeOnLan, have a look at the following settings:
#
#
# The time the frontend waits (in seconds) between reconnect tries.
# This should be the rough time your MySQL server needs for startup
#
#WOLsqlReconnectWaitTime=0
#
#
# This is the number of retries to wake the MySQL server
# until the frontend gives up
#
#WOLsqlConnectRetry=5
#
#
# This is the command executed to wake your MySQL server.
#
#WOLsqlCommand=echo 'WOLsqlServerCommand not set'

So does anyone have any guesses why the logs now say this when I try to
connect:
................................................................................
2011-10-16 22:19:37.421 UPnPautoconf() - No UPnP backends found
2011-10-16 22:19:37.421 No UPnP backends found

No UPnP backends found

Would you like to configure the database connection now? [no]  
[console is not interactive, using default 'no']
2011-10-16 22:19:37.423 Deleting UPnP client...
2011-10-16 22:19:38.033 Failed to init MythContext, exiting.
2011-10-16 22:19:38.129 mythbackend version: branches/release-0-23-fixes
[24158] www.mythtv.org
2011-10-16 22:19:38.130 Using runtime prefix = /usr
2011-10-16 22:19:38.130 Using configuration directory =
/home/mythtv/.mythtv
2011-10-16 22:19:38.130 Unable to read configuration file mysql.txt
2011-10-16 22:19:38.131 Empty LocalHostName.
2011-10-16 22:19:38.131 Using localhost value of mythtv
2011-10-16 22:19:38.137 New DB connection, total: 1
2011-10-16 22:19:38.140 Unable to connect to database!
2011-10-16 22:19:38.140 Driver error was [1/1045]:
QMYSQL: Unable to connect
Database error was:
Access denied for user 'mythtv'@'localhost' (using password: YES)


Note, if I run mythfilldatabase from the command line, it works fine
(connects to the database and everything).

Any suggestions would be appreciated!

Jon S.


More information about the mythtv-users mailing list