Thread: MySQL Rant...

    #1
  1. Contributing User
    SEO Chat Good Citizen (1000 - 1499 posts)

    Join Date
    Aug 2003
    Location
    San Diego USA
    Posts
    1,274
    Rep Power
    17

    MySQL Rant...


    This is one of those things that hopefully will never happen to anyone, but I need a place to rant after what I just went through... And maybe it will help someone in the future.

    Okay, normally I love MySQL (which I still do). But I had a table become so corrupt (for no reason... no crash, etc.) that it was all screwed up. MySQL couldn't even tell me what the field names were within the table, much less any other info about it (queries of course failed). Anyway, the index file (.MYI) was so far gone, I ended up copying the data file out (.MYD), truncating the whole table (which was scary), replacing the data file, then running a REPAIR TABLE to rebuild the indexes.

    Everything looked peachy and CHECK TABLE yielded no problems.

    So I inserted a new record... went in fine. Insert a 2nd record, and it fails. CHECK TABLE then gives this: "Found key at page 588800 that points to record outside datafile"... REPAIR TABLE repairs it and the whole thing starts again. So basically I could insert 1 record, then repair table if I ever wanted to insert another.

    So, as a FYI... run the "old school" REPAIR TABLE with the following command:

    REPAIR TABLE [table_name] EXTENDED;

    It took 3 times as long, but it seemed to work.

    Not really for any purpose other than to hopefully save someone some time if they find this message in an archive searching the web.

    - Shawn
  2. #2
  3. No Profile Picture
    JRM
    Contributing User
    SEO Chat Discoverer (100 - 499 posts)

    Join Date
    Jul 2003
    Posts
    108
    Rep Power
    16
    So the Extended part of the repair table command does a lot more then? Did that fix your problem?

    I had a similar problem, I ran out of space on the partition (caused from virus emails taking up the space) and corrupted some tables. I ended up first getting rid of the emails, then copying over the db backup. It is fixed now and I am keeping an eye on the partition useage.

    JRM
  4. #3
  5. Contributing User
    SEO Chat Good Citizen (1000 - 1499 posts)

    Join Date
    Aug 2003
    Location
    San Diego USA
    Posts
    1,274
    Rep Power
    17
    Yep... extended repair fixed it perfectly (although it took about 3 times longer), which the "normal" repair couldn't fix it (even though it said it did successfully).

    - Shawn
  6. #4
  7. No Profile Picture
    JRM
    Contributing User
    SEO Chat Discoverer (100 - 499 posts)

    Join Date
    Jul 2003
    Posts
    108
    Rep Power
    16
    Cool! Thank you for the informative post.

    JRM

Similar Threads

  1. Advanced search PHP and MySQL problem
    By bbratu in forum Web Design, Coding and Programming
    Replies: 3
    Last Post: Oct 26th, 2010, 07:28 PM
  2. Database vs HTML page e-comm sites
    By turingia in forum Search Engine Optimization
    Replies: 4
    Last Post: Nov 6th, 2003, 12:55 AM
  3. Optimizing Mysql
    By Webby in forum SEO Help (General Chat)
    Replies: 10
    Last Post: Jun 10th, 2003, 12:20 PM
  4. Newsletter and Mailing List that doesn't use MySQL
    By Tiller in forum Web Design, Coding and Programming
    Replies: 4
    Last Post: May 1st, 2003, 03:34 PM

IMN logo majestic logo threadwatch logo seochat tools logo