[mythtv-users] Myth database errors
Michael T. Dean
mtdean at thirdcontact.com
Sun Jul 31 12:39:51 UTC 2011
On 07/31/2011 08:35 AM, R KANNAN wrote:
> Hello,
>
> I have been using myth with HDHomerun for some time. Today I found I
> was suddenly unable to watch Live TV. I checked the backend log and
> found numerous errors of the form
>
> Query was:
> INSERT sched_temp_recorded SELECT * from recorded;
> Driver error was [2/145]:
> QMYSQL3: Unable to execute query
> Database error was:
> Table './mythconverg/recorded' is marked as crashed and should be repaired
>
> 2011-07-31 08:31:13.188 Scheduled 0 items in 0.1 = 0.04 match + 0.11 place
> 2011-07-31 08:31:55.435 DB Error (Error in JobQueue::GetJobs(), Unable
> to query list of Jobs in Queue.):
> Query was:
> SELECT j.id, j.chanid, j.starttime, j.inserttime, j.type, j.cmds,
> j.flags, j.status, j.statustime, j.hostna
> me, j.args, j.comment, r.endtime, j.schedruntime FROM jobqueue j,
> recorded r WHERE j.chanid = r.chanid AND
> j.starttime = r.starttime ORDER BY j.inserttime, j.chanid, j.id;
> Driver error was [2/145]:
> QMYSQL3: Unable to execute query
> Database error was:
> Table './mythconverg/recorded' is marked as crashed and should be repaired
>
> 2011-07-31 08:32:05.209 AutoExpire: CalcParams(): Max required Free
> Space: 0.0 GB w/freq: 15 min
>
> Looks like the database needs to be somehow repaired. How could I go
> about doing it?
Start by running the script optimize_mythdb.pl (distributed in the
contrib directory of the source package--often packaged into
/usr/share/doc or similar by packagers). This will almost definitely
fix it. (And, you might want to enable a cron job that runs the script
daily or weekly. I run it daily, just in case.)
If that doesn't work, you'll need to manually repair it using
mysqlcheck. See the MySQL documentation for more on mysqlcheck.
Mike
More information about the mythtv-users
mailing list