Database corrupted. Possible to repair? (1 Viewer)

doveman

Portal Pro
February 12, 2008
2,326
178
Home Country
United Kingdom United Kingdom
My PC was acting up earlier and the logs show that my HD has a bad block and also a MySQL error that says "Incorrect key file for table '.\mptvdb\program.MYI'; try to repair it". How would I go about this? I've installed SQL Server Management Studio Express but I can't even connect to anything using it, so I'm in over my head here.

I've attached the TV Server error.log.

MediaPortal Version: v1.1 rev23684
MediaPortal Skin: Blue3Wide
Windows Version: XP Pro SP3
CPU Type: Intel P4 2.8Ghz Northwood (non-HT)
HDD: 500GB Western Digital SATA
Memory: 1.5GB DDR
Motherboard: Gigabyte 8i848-PM
Video Card: Leadtek FX5600 256MB VIVO
Video Card Driver: 175.19
Sound Card: onboard Realtek AC97 (ALC655)
Sound Card AC3: no AC3
Sound Card Driver: 5.10.0.6300
1. TV Card: Hauppauge Nova-T 500
1. TV Card Type: DVB-T
1. TV Card Driver: 4.3.26168.0
2. TV Card:
2. TV Card Type:
2. TV Card Driver:
3. TV Card:
3. TV Card Type:
3. TV Card Driver:
4. TV Card:
4. TV Card Type:
4. TV Card Driver:
MPEG2 Video Codec: Cyberlink Video/SP Decoder (PDVD7)
MPEG2 Audio Codec: MPC - MPA Decoder Filter
h.264 Video Codec: MPC - Video Decoder
Satelite/CableTV Provider:
HTPC Case: Custom
Cooling: Nexus 120mm Intake Fan, Accelero S2, Mini Ninja
Power Supply: DELL DA-2 AC->12v DC, mCubed EF28 DC-DC board
Remote: Nova-T 500
TV: Sony XBR800 36"
TV - HTPC Connection: DVI
 

doveman

Portal Pro
February 12, 2008
2,326
178
Home Country
United Kingdom United Kingdom
Never mind. I realised SQL Server Management Studio Express isn't designed to work with MySQL!

I used myisamchk -r -q on Program.MYI and everything seems to be working again now.
 

ashsoft

Portal Member
May 6, 2009
6
14
Pendle Forest
Home Country
United Kingdom United Kingdom
Since running MP Version 1.1. beta I have had a number of corruptions to program.myi.
So I have been have used the following to repair mysql database files.

CD C:\Program Files\MySQL\MySQL Server 5.1\bin
mysqlcheck mptvdb --auto-repair -e -u root -p

when asked password = "MediaPortal"

Hope it help anyone as it took me hours to find how to do this. :confused:
 

RobNorthcott

MP Donator
  • Premium Supporter
  • October 9, 2007
    540
    102
    Dartmoor, England
    Home Country
    United Kingdom United Kingdom
    CD C:\Program Files\MySQL\MySQL Server 5.1\bin
    mysqlcheck mptvdb --auto-repair -e -u root -p

    when asked password = "MediaPortal"
    My hero!
    I was about to give up and restore a backup - machine was accidentally rebooted by a knackered DVD and suddenly no live TV or EPG. This command cured it :) Only worked with the tvserver service shut down though (although I suppose that should have been obvious).

    Rob
     

    drum

    Portal Member
    February 1, 2008
    10
    0
    Home Country
    England England
    I am seeing that many database corruptions in v1.1 that I've had to add these lines to autoexec.bat, so that whenever the PC is restarted the DB is repaired. At first I thought it was the kids not shutting down properly, however it's done it to me a couple of times while I've been watching a film.
     

    Cybe

    New Member
    March 12, 2010
    1
    0
    Home Country
    Czech Republic Czech Republic
    Great! My MP got the same "Unknown Error" - in LiveTV and also in Preview in config. I almost gave it, but I'll try to check my db, maybe it will be the problem.
    Is possible to run mysqlcheck automatically, when system start for example, without asking password? In case, when htpc crashes or reboots accidentally in and causes some db problem during scheduled recording? I need to recover MP automatically for future recording.
     

    messo001

    Portal Member
    July 11, 2009
    24
    9
    How could you run the code below before Tv-Server is started?
    Code:
    CD C:\Program Files\MySQL\MySQL Server 5.1\bin
    mysqlcheck mptvdb --auto-repair -e -u root -p

    Also, I have noticed that while mySQL produced regular database corruptions, Microsoft's SQL package does a great job at providing a solid solution.
     

    The Doctor

    MP Donator
  • Premium Supporter
  • December 24, 2007
    180
    14
    Home Country
    Netherlands Netherlands
    This thread should be pinned on top of the whole MediaPortal website.


    Thanks, my database got killed twice in one week 1st by a dvd (Maters strong story or something like that) and 2nd time by a mediaportal hardcrash during thumbnailing a few homebrew movies. (and that all with 1.20 alpha).

    :D
     

    Users who are viewing this thread

    Top Bottom