[ATrpms-users] Problem backing up myth database
John Pilkington
J.Pilk at tesco.net
Thu Apr 3 21:35:19 CEST 2008
Jim Chandler wrote:
> Did you google "mysql repair crashed db" ?
>
> from a mysql prompt, try "REPAIR TABLE mythlog", when using the
> mythconverg db of course.
>
> Jim
>
> Jeffrey J. Kosowsky wrote:
>> Before upgrading from mythtv 0.20 to 0.21, I tried backing up my
>> database using:
>> mysqldump -umythtv -pmythtv --extended-insert --databases mythconverg
>> -c > backupfile
>>
>> However, I get the following error message:
>> mysqldump: Got error: 145: Table './mythconverg/mythlog' is marked as
>> crashed and should be repaired when using LOCK TABLES
>>
>> So, how do I "repair" the database? (and what might have caused this)
>> Note that mythtv otherwise seems to be working just fine.
>>
>> Thanks,
>> Jeff
>>
>>
>> Note the full output of the backup is:
>> -- MySQL dump 10.11
>> --
>> -- Host: localhost Database: mythconverg
>> -- ------------------------------------------------------
>> -- Server version 5.0.45
>>
>> /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
>> /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
>> /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
>> /*!40101 SET NAMES utf8 */;
>> /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
>> /*!40103 SET TIME_ZONE='+00:00' */;
>> /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
>> /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS,
>> FOREIGN_KEY_CHECKS=0 */;
>> /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE,
>> SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
>> /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
>>
>> --
>> -- Current Database: `mythconverg`
>> --
>>
>> CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mythconverg` /*!40100
>> DEFAULT CHARACTER SET latin1 */;
>>
>> USE `mythconverg`;
>> mysqldump: Got error: 145: Table './mythconverg/mythlog' is marked as
>> crashed and should be repaired when using LOCK TABLES
>>
>
Looks like a question for the myth-users list, but you might try the
0.20 version of:
perl /usr/share/doc/mythtv-docs-0.21/contrib/optimize_mythdb.pl
to be run while mythbackend is running.
John P
More information about the atrpms-users
mailing list