[mythtv-users] DB error

Michael T. Dean mtdean at thirdcontact.com
Tue May 21 14:30:31 UTC 2013


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.

Mike


More information about the mythtv-users mailing list