[mythtv-users] db upgrade ? please help :)
fordy ydrof
fordy at ydrof.com
Sun Sep 22 17:16:36 UTC 2013
thanks everyone! its working now
On Sat, Sep 21, 2013 at 7:41 PM, Stephen Worthington <
stephen_agent at jsw.gen.nz> wrote:
> On Sat, 21 Sep 2013 17:33:25 -0400, you wrote:
>
> >On Sat, Sep 21, 2013 at 2:37 PM, fordy ydrof <fordy at ydrof.com> wrote:
> >> Database error was:
> >> Table './mythconverg/recordmatch' is marked as crashed and last
> (automatic?)
> >> repair failed
> >
> >You need to fix this within mysql before doing anything with mythtv.
> >
> >I'd start with running:
> >
> >mysqlcheck --auto-repair mythconverg
> >
> >and then see how it goes after that.
> >
> >Eric
>
> Yes, it looks like your old 0.24 database is a little corrupt and
> needs repair before attempting the upgrade. In Mythbuntu installs,
> there is a cron.daily script that you normally turn on from Mythbuntu
> Control Center that does a full check/repair on the database each day
> to prevent this sort of problem. So after you have things working
> again, you might like to do the same thing. Here is a copy of the
> script (optimise_db):
>
> #!/usr/bin/perl -w
> #
> # Connects to the mythtv database and repairs/optimizes the tables
> that it
> # finds. Suggested use is to cron it to run once per day.
> #
> # @url $URL$
> # @date $Date$
> # @version $Revision$
> # @author $Author$
> # @license GPL
> #
>
> # Includes
> use DBI;
> use MythTV;
>
> # Connect to mythbackend
> my $Myth = new MythTV({'connect' => 0});
>
> # Connect to the database
> $dbh = $Myth->{'dbh'};
>
> # Repair and optimize each table
> foreach $table ($dbh->tables) {
> unless ($dbh->do("REPAIR TABLE $table")) {
> print "Skipped: $table\n";
> next;
> };
> if ($dbh->do("OPTIMIZE TABLE $table")) {
> print "Repaired/Optimized: $table\n";
> }
> if ($dbh->do("ANALYZE TABLE $table")) {
> print "Analyzed: $table\n";
> }
> }
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://www.mythtv.org/mailman/listinfo/mythtv-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mythtv.org/pipermail/mythtv-users/attachments/20130922/d9a22b68/attachment.html>
More information about the mythtv-users
mailing list