Announcement

Collapse
No announcement yet.

DB errors

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

  • DB errors

    When i try to post a new topic on my VB 4.2.2 forum i get

    Database Error Database error
    The HernboHost Community database has encountered a problem.
    Please try the following:
    Load the page again by clicking the Refresh button in your web browser.
    Open the forums.hernbohost.com home page, then try to open another page.
    Click the Back button to try another link.
    The forums.hernbohost.com forum technical staff have been notified of the error, though you may contact them if the problem persists.

    We apologise for any inconvenience.


    Database error in vBulletin 4.2.2:

    Invalid SQL:

    INSERT INTO postlog
    (postid, useragent, ip, dateline)
    VALUES
    (45, 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.94 Safari/537.36', 845726182, 1423137430);

    MySQL Error : Duplicate entry '45' for key 'PRIMARY'
    Error Number : 1062
    Request Date : Thursday, February 5th 2015 @ 11:57:10 AM
    Error Date : Thursday, February 5th 2015 @ 11:57:10 AM
    Script : http://forums.hernbohost.com/newthre...ostthread&f=22
    Referrer : http://forums.hernbohost.com/newthre...newthread&f=22
    IP Address : 50.104.193.230
    Username : JIM
    Classname : vB_Database
    MySQL Version : 5.5.40-cll


    Can you please help with this ??

  • #2
    Try to repair and optimize the table

    Comment


    • #3
      Originally posted by starme View Post
      Try to repair and optimize the table
      That won't do anything to fix this issue.



      What is the result of this query?

      select max(postid) from postlog

      Translations provided by Google.

      Wayne Luke
      The Rabid Badger - a vBulletin Cloud customization and demonstration site.
      vBulletin 5 Documentation - Updated every Friday. Report issues here.
      vBulletin 5 API - Full / Mobile
      I am not currently available for vB Messenger Chats.

      Comment


      • #4
        max(postid)
        50

        Comment


        • #5
          Somehow the auto-increment is off there. You'll actually need to increase the auto-increment value on the post table to fix this. Follow these steps:

          1) Turn off your forums.
          2) Create a database backup for data security purposes.
          3) Run this query:
          Code:
          SELECT max(postid)+1 FROM POST
          4. Take the result from that query and use it for XX below:
          Code:
          ALTER TABLE post AUTO_INCREMENT=XX
          Translations provided by Google.

          Wayne Luke
          The Rabid Badger - a vBulletin Cloud customization and demonstration site.
          vBulletin 5 Documentation - Updated every Friday. Report issues here.
          vBulletin 5 API - Full / Mobile
          I am not currently available for vB Messenger Chats.

          Comment


          • #6
            Ok im kinda a newb here when it comes to getting into the bowels of the beast.

            1. By turning off the forum do you mean log out ? then go into the Admin CP from the url. ?

            2. database backup i get.

            3 Run that query i got.

            4. This is what i dont follow, where is that Code located so i can enter the info ?

            ALTER TABLE post AUTO_INCREMENT=XX ???? thanks up front for all this help
            Last edited by jimv8673; Thu 5th Feb '15, 12:22pm.

            Comment


            • #7
              Sorry... #4 is a query as well.

              To turn off your forums go into the AdminCP. Then go to Settings -> Options -> Turn your forum on/off. You don't need to logout first.
              Translations provided by Google.

              Wayne Luke
              The Rabid Badger - a vBulletin Cloud customization and demonstration site.
              vBulletin 5 Documentation - Updated every Friday. Report issues here.
              vBulletin 5 API - Full / Mobile
              I am not currently available for vB Messenger Chats.

              Comment


              • #8
                Ok, turned off the forum, ran the first query and got this.

                An error occurred while attempting to execute your query. The following information was returned.
                error number: 1146
                error desc: Table 'forumshh_Forum.POST' doesn't exist

                Now what ??

                Comment


                • #9
                  Well, that shouldn't happen. If you didn't have a post table you'd know it. How are you executing the queries? Do you have more than one database? From your first post it doesn't look like you have a table prefix set.

                  Comment


                  • #10
                    Really ?? i actually went to the tables via the phpMyAdmin in the Cpanel, and that table is actually not there, but i dont know how to get it there, and if just adding that table somehow will fix this issue.

                    Comment


                    • #11
                      The post table is where the posts are stored, and you have posts on your forum already, so I don't see how it could be missing. There has to be something else going on.

                      Edit: well, I suppose it's possible that everything being displayed is cached and you are actually missing the post table. Are you able to edit an existing post?

                      Last edited by kh99; Thu 5th Feb '15, 3:56pm.

                      Comment


                      • #12
                        You are right, i checked again and the Post table is there.
                        Is this query string correct ?

                        SELECT max(postid)+1 FROM POST
                        Is any of that case sensitive etc. ??

                        Comment


                        • #13
                          well, i ran a bunch of maintenance tools, in the admincp, and the issue seems to be corrected,

                          i suppose, dont look a gift horse in the mouth, and i also learned a couple of things along the way, ive worked on this issue all day.

                          Comment


                          • #14
                            Thank anyone who replied so much for your efforts

                            Comment

                            Related Topics

                            Collapse

                            Working...
                            X