[mythtv-users] DB error
Leo Butler
leo.butler at member.fsf.org
Fri May 31 14:43:13 UTC 2013
>From mailnull Tue May 21 14:31:57 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: Tue, 21 May 2013 10:30:31 -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/21/2013 09:56 AM, Leo Butler wrote:
> From: "Michael T. Dean"
>
> 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).
If using optimize_mythdb.pl, then you should use the mythtv user. If
using mysqlcheck directly, you can use any system user, but will likely
need to use the root MySQL user.
For reference, I seem to have fixed the db errors with
mysqlcheck -u mythtv -pblah --repair mythconverg
The only table that was corrupted was the recordedseek table, which
may have been caused by a power outage around that time.
Thanks for the mysql reference. I hadn't found anything useful before,
and those docs are quite good.
Leo
More information about the mythtv-users
mailing list