Announcement

Collapse
No announcement yet.

Database error message (incorrect key file for table)?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Database error message (incorrect key file for table)?

    Just got the below message when a user tried to use the "getnew" action on the search script.

    Database error in vBulletin 2.2.1:

    Invalid SQL: UPDATE user SET lastvisit=lastactivity,lastactivity=1012670547,inforum='0' WHERE userid='1589'
    mysql error: Incorrect key file for table: 'user'. Try to repair it

    mysql error number: 1034



    This is the first ever like this...is my table maybe corrupt somewhere? Should I try to repair it and if so which table and what MySQL command should I run on it (or do I use the repair.php script?).

    Thanks,

    marc
    Marc
    -------

  • #2
    REPAIR TABLE user;

    from phpMyAdmin or the mysql prompt.

    Comment


    • #3
      Ok, ran it and in about 1/8th of a second (is that right?) it came back with this:

      mysql> REPAIR TABLE user;
      +------------------+--------+----------+----------+
      | Table | Op | Msg_type | Msg_text |
      +------------------+--------+----------+----------+
      | rcvbulletin.user | repair | status | OK |
      +------------------+--------+----------+----------+
      1 row in set (0.28 sec)


      does that mean it did not find an error?

      thanks freddie.

      marc
      Marc
      -------

      Comment


      • #4
        No, you have to run CHECK TABLE repair to see if you have errors. REPAIR TABLE will only return an error if it was unable to fix the problem. If the table had no error to begin with or if the table was repaired then REPAIR will return "OK".

        Comment


        • #5
          Originally posted by freddie
          No, you have to run CHECK TABLE repair to see if you have errors. REPAIR TABLE will only return an error if it was unable to fix the problem. If the table had no error to begin with or if the table was repaired then REPAIR will return "OK".
          Does this mean that either my table was corrupt and was repaired or it was not corrupt and is ok? Either way the OK message I got means it is ok...I don't need to run the check table command now, do I since I got the OK message from the repair command?

          Sorry for the questions...this is the first database repair I've done or error message so this part of mySQL is a little new for me...

          marc
          Marc
          -------

          Comment


          • #6
            Originally posted by mvigod


            Does this mean that either my table was corrupt and was repaired or it was not corrupt and is ok? Either way the OK message I got means it is ok...I don't need to run the check table command now, do I since I got the OK message from the repair command?

            Sorry for the questions...this is the first database repair I've done or error message so this part of mySQL is a little new for me...

            marc
            given the original error message i think your user table was corrupted and was repaired
            :: Always Back Up Forum Database + Attachments BEFORE upgrading !
            :: Nginx SPDY SSL - World Flags Demo [video results]
            :: vBulletin hacked forums: Clean Up Guide for VPS/Dedicated hosting users [ vbulletin.com blog summary ]

            Comment

            widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
            Working...
            X