[mythtv-users] DB error
Leo Butler
leo.butler at member.fsf.org
Tue May 21 13:56:16 UTC 2013
>From mailnull Mon May 20 20:02:04 2013
X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED,
RP_MATCHES_RCVD autolearn=ham version=3.3.2
Date: Mon, 20 May 2013 16:00:34 -0400
From: "Michael T. Dean" <mtdean at thirdcontact.com>
Reply-To: Discussion about MythTV <mythtv-users at mythtv.org>
Content-Type: text/plain; charset="us-ascii"; format=flowed
On 05/20/2013 03:13 PM, leo.butler wrote:
> I had a number of recording errors last night on my myth BE (mythbuntu
> 12.04.2). After looking at the backend log file, I came across a
> number of errors like the following:
>
>
> May 17 21:00:00 mythtv-server mythbackend[2045]: E Scheduler mythdbcon.cpp:823 (prepare) Error preparing query: DELETE FROM recordedseek WHERE chanid = :CHANID AND starttime = :START;
> May 17 21:00:00 mythtv-server mythbackend[2045]: E Scheduler mythdbcon.cpp:825 (prepare) Driver error was [2/144]:#012QMYSQL3: Unable to prepare statement#012Database error was:#012Table './mythconverg/recordedseek' is marked as crashed and last (automatic?) repair failed
> May 17 21:00:00 mythtv-server mythbackend[2045]: E Scheduler mythdb.cpp:192 (DBError) DB Error (Clear seek info on record):#012Query was:#012DELETE FROM recordedseek WHERE chanid = :CHANID AND starttime = :START;#012Bindings were:#012:CHANID=2005, :START=2013-05-17T21:00:00#012Driver error was [2/1064]:#012QMYSQL: Unable to execute query#012Database error was:#012You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ':CHANID AND starttime = :START' at line 1
>
> How can I fix this problem and clear the error?
You can start by running the optimize_mythdb.pl script and see if it
fixes the crashed MySQL table data files. If not, you get to learn some
MySQL database administration:
http://dev.mysql.com/doc/refman/5.0/en/mysqlcheck.html
Thanks, Mike. Just so I am clear, I should do all maintenance as the
mythtv user, correct? (The mythbackend is run by the mythtv user on
the setup I am using).
Alternatively, you can restore a backup from before the (most likely)
server crash that caused the database corruption and put any new
recording files into Video Library. (You can find the new recording
files with http://www.mythtv.org/wiki/Find_orphans.py .
Thanks again.
Leo
More information about the mythtv-users
mailing list