Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#2749 closed defect (invalid)

mythbackend fails to start after database password change

Reported by: dcarlo@… Owned by: Isaac Richards
Priority: minor Milestone: unknown
Component: mythtv Version: 0.20
Severity: medium Keywords:
Cc: Ticket locked: no

Description

I changed the password for the mythtv user in MySQL, updated my mysql.txt file, and the mythbackend service wouldn't start after a reboot. The log showed:

===================================================================== 2006-11-28 17:47:09.755 Failed to init MythContext, exiting. 2006-11-28 18:13:27.142 Using runtime prefix = /usr 2006-11-28 18:13:27.256 New DB connection, total: 1 2006-11-28 18:13:27.266 Unable to connect to database! 2006-11-28 18:13:27.267 Driver error was [1/1045]: QMYSQL3: Unable to connect Database error was: Access denied for user 'mythtv'@'localhost' (using password: YES) QSqlQuery::exec: database not open QSqlQuery::exec: database not open 2006-11-28 18:13:27.325 DB Error (KickDatabase?): Query was: SELECT NULL; No error type from QSqlError? Strange... =====================================================================

It would start if I ran /etc/init.d/mythbackend start. After tinkering around for a while, I discovered if I set the HOME environment variable, the service would start properly. It looks like mythbackend uses $HOME to find the mysql.txt file which isn't present when the startup script is invoked by init. I'm running mythTV FC6.

Hope this helps. Keep up the good work.

--Dave

Change History (4)

comment:1 Changed 13 years ago by Isaac Richards

Resolution: invalid
Status: newclosed

$HOME must be set.

comment:2 Changed 13 years ago by anonymous

Resolution: invalid
Status: closedreopened

Agreed, $HOME must be set. However, when the startup script is run during bootup, the init process does not set $HOME, so the script gets executed without $HOME set. The init process strips out all environment variables except:

TERM=vt100
PATH=/sbin:/usr/sbin:/bin:/usr/bin
PWD=/
LANG=en_US.UTF-8
SHLVL=1

comment:3 Changed 13 years ago by danielk

Resolution: invalid
Status: reopenedclosed

This is a packaging problem. One I believe is already fixed in Axel's latest RPMs. But in anycase this does not belong in the MythTV trac unless you believe the sample etc.rc.d.init.d.mythbackend file in contrib needs amending.

comment:4 Changed 13 years ago by anonymous

No, thank you.

Note: See TracTickets for help on using tickets.