Welcome to the JaguarPC Community
JaguarPC
Sales: (888) 338-5261
Support: (888)-551-3050
Results 1 to 3 of 3

This is a discussion on Crashed table? No panic! in the Shared & Semi-Dedicated forum
I recently had a table crash. All the data (400K of carefully picked up data like monument descriptions, timetables, addresses, phones and so on) vanished ...

  1. #1
    JPC Member
    Join Date
    Oct 2002
    Posts
    15

    Crashed table? No panic!

    I recently had a table crash. All the data (400K of carefully picked up data like monument descriptions, timetables, addresses, phones and so on) vanished in the air.

    Of course I should have made regular backups. Sometimes I do. Generally I make a routine to do it for me while I sleep. But I didn't this once.

    I was advised to drop the crashed table and reload it again. However, I thought that could be a little too radical too start with.

    So I went to mysql.com, Documentation, searched for crash.

    One suggestion only: use REPAIR TABLE <tablename>

    So I did. I wrote a small php script:

    mysql_connect(your data)

    $query="repair table monuments";
    $res=mysql_query($query);
    echo $res;

    I ran the script and got an OK page.

    At first I thought it was to quick, too easy, but then I went to see and yes, the table was there, in all its glory, there's probably a corrupt record somewhere, but I didn't find it yet.

    Hope this helps someone...

  2. #2
    Community Leader jason's Avatar
    Join Date
    Sep 2001
    Location
    Rochester, NY
    Posts
    6,003
    There's also a non-programming way to do this. (I hesitate to say "easier way" because there are more steps involved, but for a non-programmer, this would be easier.)

    1. Log in to your CPanel
    2. Click on phpMyAdmin
    3. Select the database that contains the corrupt table
    4. Click on the name of the table
    5. Click on the "Operations" tab at the top of the page.
    6. Click on "Repair table" under "Table maintenance."

    --Jason
    Jason Pitoniak
    Interbrite Communications
    www.interbrite.com www.kodiakskorner.com

  3. #3
    Like a star... Julian Muņoz's Avatar
    Join Date
    Oct 2002
    Location
    Colombia
    Posts
    1,399
    Generally there is lost information after a table is repaired... When the thread table on my forum was corrupted, a thread on the forum disappeared... I noticed the missing thread because it was a very active thread on the moment, so I had to add the thread manually to the database to recover it.

    The best advice to prevent this situation is to make regular backups of the database... You can even do it automatically on a daily basis. Search the forums and you will find answers
    Julian D. Muņoz - LANeros.com

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •