Database corrupted again!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jdearing
    Senior Member
    • May 2001
    • 175

    Database corrupted again!

    Started getting this error today and forums are all hosed up!

    Database error in vBulletin: Invalid SQL: INSERT INTO thread (threadid,title,lastpost,forumid,open,replycount,postusername,postuserid,lastposter,dateli ne,iconid,visible,attach) VALUES (NULL,'jordan ya should have bought new brakes too','999543737','6','1','0','sparky','61','sparky','999543737','0','1','0')
    mysql error: Duplicate entry '0' for key 2
    mysql error number: 1062
    Date: Monday 03rd of September 2001 03:02:17 PM
    Script: /forums/newthread.php
    Referer: http://www.stlracing.com/forums/newthread.php
    http://www.stlracing.com
  • Mike Sullivan
    Former vBulletin Developer
    • Apr 2000
    • 13327
    • 3.6.x

    #2
    Go into phpMyAdmin and check your indexes on the thread table. The only unique one should be threadid.

    install.php has them laid out like this:

    PRIMARY KEY (threadid),
    KEY iconid (iconid),
    KEY forumid (forumid, visible, sticky, lastpost)

    After we know which is the problem (iconid?), I'll show you how to fix it.

    And that's not corruption, BTW.

    Comment

    • jdearing
      Senior Member
      • May 2001
      • 175

      #3
      Indexes : Keyname Unique Field Action
      PRIMARY Yes threadid Drop
      iconid No iconid Drop
      forumid No forumid Drop
      forumid No visible Drop
      forumid No sticky Drop
      forumid No lastpost Drop
      http://www.stlracing.com

      Comment

      • Mike Sullivan
        Former vBulletin Developer
        • Apr 2000
        • 13327
        • 3.6.x

        #4
        Uhhh... wow, what the?

        Try dropping the iconid index.

        ALTER TABLE thread DROP INDEX iconid;

        And re-adding it:

        ALTER TABLE thread ADD INDEX (iconid);

        If that doesn't help, try the same thing with the forumid index.

        ALTER TABLE thread DROP INDEX forumid;

        ALTER TALBE thread ADD INDEX (forumid, visible, sticky, lastpost);

        Quite weird...

        Comment

        • jdearing
          Senior Member
          • May 2001
          • 175

          #5
          I also got this error when in control panel while turning the forum off....

          mysql error: Got error 127 from table handler
          mysql error number: 1030
          Date: Monday 03rd of September 2001 03:37:26 PM
          Script: /forums/admin/options.php
          Referer: http://www.stlracing.com/forums/admi...action=options
          http://www.stlracing.com

          Comment

          • jdearing
            Senior Member
            • May 2001
            • 175

            #6
            I got the (iconid) dropped, just how do I add it back?
            http://www.stlracing.com

            Comment

            • Mike Sullivan
              Former vBulletin Developer
              • Apr 2000
              • 13327
              • 3.6.x

              #7
              That's definately corruption, so I'd recommend running repair.php on your boards.

              Comment

              • jdearing
                Senior Member
                • May 2001
                • 175

                #8
                where is repair.php located?
                http://www.stlracing.com

                Comment

                • George L
                  Former vBulletin Support
                  • May 2000
                  • 32996
                  • 3.8.x

                  #9
                  Originally posted by jdearing
                  where is repair.php located?
                  in your extras folder in your vB zip file.. you need to upload it to your admin directory
                  :: 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

                  • jdearing
                    Senior Member
                    • May 2001
                    • 175

                    #10
                    I get this error running repair.php

                    Database error in vBulletin Control Panel: Invalid SQL: CHECK TABLE access
                    mysql error: You have an error in your SQL syntax near 'CHECK TABLE access' at line 1
                    mysql error number: 1064
                    Date: Monday 03rd of September 2001 04:25:02 PM
                    Script: /forums/admin/repair.php?check=1&iterations=4
                    Referer:
                    http://www.stlracing.com

                    Comment

                    • jdearing
                      Senior Member
                      • May 2001
                      • 175

                      #11
                      Also in phpAdmin

                      When running the command:

                      ALTER TABLE thread ADD INDEX (iconid);

                      I get a message that (iconid) does not exist...

                      Here is the current:

                      Keyname Unique Field Action
                      PRIMARY Yes threadid Drop
                      forumid No forumid Drop
                      forumid No visible Drop
                      forumid No sticky Drop
                      forumid No lastpost Drop
                      Last edited by jdearing; Mon 3 Sep '01, 12:37pm.
                      http://www.stlracing.com

                      Comment

                      • jdearing
                        Senior Member
                        • May 2001
                        • 175

                        #12
                        I restored to an earlier database..Board is currently back up again.

                        I get this template error now via email, doesn't seem major but,

                        Database error in vBulletin: Invalid SQL: SELECT template FROM template WHERE title='options'
                        mysql error: Table 'stlracing_new.template' doesn't exist
                        mysql error number: 1146
                        Date: Monday 03rd of September 2001 06:45:22 PM
                        Script: /forums/index.php
                        Referer:

                        I still cannot run the repair.php file either. I get this error:

                        There seems to have been a slight problem with the database. Please try again by pressing the refresh button in your browser.

                        An E-Mail has been dispatched to our Technical Staff, who you can also contact if the problem persists.

                        We apologise for any inconvenience.


                        Database error in vBulletin Control Panel: Invalid SQL: CHECK TABLE access
                        mysql error: You have an error in your SQL syntax near 'CHECK TABLE access' at line 1
                        mysql error number: 1064
                        Date: Monday 03rd of September 2001 06:51:53 PM
                        Script: /forums/admin/repair.php?check=1&iterations=4
                        Referer:
                        http://www.stlracing.com

                        Comment

                        • Mike Sullivan
                          Former vBulletin Developer
                          • Apr 2000
                          • 13327
                          • 3.6.x

                          #13
                          Ok, you don't have MySQL 3.23 -- you'll need to shut down MySQL and run isamchk to repair the database. This should give you some info about how to repair using isamchk: http://page.novgorod.ru/mysqlmanual/...87.html#SEC103

                          As for that index bit, try this query instead:

                          CREATE INDEX iconid ON thread (iconid);

                          Comment

                          • jdearing
                            Senior Member
                            • May 2001
                            • 175

                            #14
                            Since this site is remotely hosted, I sent this info to my host.

                            Hopefully they can do this for me...

                            Ah yes, 3.22 is the version of mysql on their servers. Damn Web2010!
                            http://www.stlracing.com

                            Comment

                            • may
                              Senior Member
                              • Sep 2001
                              • 180
                              • 5.6.X

                              #15
                              Hi Ed,

                              question: I have the same problem and if my hoster will make an update to V3.23, the wrong entries in table thread will not be away. When I will make this...

                              Ed said:
                              ALTER TABLE thread DROP INDEX iconid;
                              And re-adding it:
                              ALTER TABLE thread ADD INDEX (iconid);
                              If that doesn't help, try the same thing with the forumid index.
                              ALTER TABLE thread DROP INDEX forumid;
                              ALTER TALBE thread ADD INDEX (forumid, visible, sticky, lastpost);


                              ...my data will be partially away. Where do I will get them back?
                              Sorry for that question, it sounds a bit stupid.

                              May

                              Comment

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