Announcement

Collapse
No announcement yet.

Lost 'search' table in vb2.2.6 DB...

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

  • Lost 'search' table in vb2.2.6 DB...

    Hi,

    Currently I'm using an old version of vbulletin 2.2.6; in process of upgraded to latest version within the next few months. However, I need to keep this old version running. To start things off, my current host had some recent database server issues which resulted in some corruption to my database; which they nor I can 100% accurately repair. We can however; most of the time, have it running in at least an operational status to allow my forum members to continue browsing and posting.

    Now, I don't need any replies saying stuff like "Don't you backup your DB?" or whatnot... of course I do/DID ... did being the keyword. The issue with all this DB corruption didn't JUST occur from my current host. It initially & primarily all started on my LAST HOST; whom was a privately home-run reseller type host. Tip: NEVER host a forum/community site on a reseller's account - unreliable, poor support, etc. just a number of vast negative issues that easily arise from those types of so-called 'webhosts' :|. OK back to the issue... that old host's database server crashed bigtime and corrupted a LOT of the databases of clients/people he was hosting. When they occurred and my forums/site was inaccessible for over a week with NO word from him at all, I performed my last backup of the database off that old host. At that time though, I did NOT know his crashed server issues caused considerable & extensive corruption of my database.

    I've since then attempted; and sometimes been successful in repairing a good portion of corrupted tables and so on. Now I am experiencing another odd issue; one I still need to call my current webhost's tech support and consult them as to HOW, WHY, or WHO did this. Basically... I am having an issue with the 'search' table of my vb2.2.6 database just.... disappearing. It is GONE completely. Below is a copy of the error I get whenever I try to search the forums:

    ==============================================

    Database error in vBulletin 2.2.6:

    Invalid SQL: SELECT searchid,dateline FROM search WHERE userid=4 ORDER BY dateline DESC LIMIT 1
    mysql error: Table 'dbname.search' doesn't exist

    mysql error number: 1146

    Date: Monday 28th of August 2006 04:01:41 AM
    Script: http://www.mydomain/forum/forum/search.php
    Referer: http://www.mydomain.com/forum/search.php?s=

    ==============================================
    *Note: I edited out my db's name and put in dbname in place just for privacy concerns .


    Does anyone have any idea of what may have happened and why the 'search' table just disappeared for no reason? Any suggestions or input would be helpful and much appreciated.

    I would however like to ask as well: Could I simply re-create the 'search' table and add it in new?? If so, what would be the exact SQL query or method to re-add it in manually??? I'm no expert with MySQL, but I know the basics and enough to get by. Any assistance on this would be just so gracious. Thanks bigtime in advance to whomever has any guidance to share with me for this issue. Have a good week otherwise .


    Bob

  • #2
    Hello Bob,

    Can you check in phpMyAdmin if there really is no table called 'search'?
    If not, you should be able to recreate it using this query:

    Code:
    CREATE TABLE search (
       searchid int(10) unsigned NOT NULL auto_increment,
       query mediumtext NOT NULL,
       postids mediumtext NOT NULL,
       dateline int(10) unsigned DEFAULT '0' NOT NULL,
       querystring varchar(200) NOT NULL,
       showposts smallint(6) DEFAULT '0' NOT NULL,
       userid int(10) unsigned DEFAULT '0' NOT NULL,
       ipaddress varchar(20) NOT NULL,
       PRIMARY KEY (searchid),
       KEY (querystring),
       KEY (userid)
    );
    Best Regards
    Colin Frei

    Please don't contact me per PM.

    Comment


    • #3
      I had already checked phpMyAdmin that the table was actually gone. That's why I posted this in the first place .

      Thanks you bigtime for the query info. I'll give that a shot and see how it turns out .

      Comment


      • #4
        SWEET it worked. Thanks again so much Colin. Worked like a charm. I had my doubts as to if it would work again just by re-adding a new table, but it did.

        Would you advise if I should rebuild the search index then as well? Even though I did do that a couple weeks ago... wondering if it'd be good to redo that now as well.

        Comment


        • #5
          The search table really doesn't store the actual search index so you should be fine not rebuilding it.
          Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
          Change CKEditor Colors to Match Style (for 4.1.4 and above)

          Steve Machol Photography


          Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


          Comment

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