Error: Duplicate entry for key 'PRIMARY'

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cuocsongso
    Member
    • Sep 2010
    • 49
    • 4.0.x

    Error: Duplicate entry for key 'PRIMARY'

    Hi!

    When I restoring my database (3.5GB) on localhost, an error message is show:
    Code:
    ERROR 1062 (23000) at line 24921426: Duplicate entry '231377' for key 'PRIMARY'
    My Vbulletin version: 3.8
    I don't have other any backup database. Help me fix it please.
    Thank you!
    CuocSongSo.com
  • Trevor Hannant
    vBulletin Support
    • Aug 2002
    • 24200
    • 5.7.X

    #2
    Sounds like your restoring to a non-empty database. Try creating a new database and restoring to there - do you have the same problem?
    Vote for:

    - Admin Settable Paid Subscription Reminder Timeframe (vB6)
    - Add Admin ability to auto-subscribe users to specific channel(s) (vB6)

    Comment

    • cuocsongso
      Member
      • Sep 2010
      • 49
      • 4.0.x

      #3
      Originally posted by Trevor Hannant
      Sounds like your restoring to a non-empty database. Try creating a new database and restoring to there - do you have the same problem?
      I restore with new database so it's empty database.
      I have backup throught mysqldumper. But I can restore by it. Because my database is large.
      I restore by using follow command:
      Code:
       mysql -u root -p forum < forum.sql
      I'm using EasyPHP 5.33.
      CuocSongSo.com

      Comment

      • Trevor Hannant
        vBulletin Support
        • Aug 2002
        • 24200
        • 5.7.X

        #4
        Without knowing the table that entry is in (and the duplicate), it'll be hard to fix. Can you search for that key and let us know what the actual entry is?
        Vote for:

        - Admin Settable Paid Subscription Reminder Timeframe (vB6)
        - Add Admin ability to auto-subscribe users to specific channel(s) (vB6)

        Comment

        • cuocsongso
          Member
          • Sep 2010
          • 49
          • 4.0.x

          #5
          Originally posted by Trevor Hannant
          Without knowing the table that entry is in (and the duplicate), it'll be hard to fix. Can you search for that key and let us know what the actual entry is?
          You know, Size of database is 3.5GB. I can't open it by notepad++ or other program.
          I don't know how to view/edit it?
          Can you use teamview to help me restore it.
          Thank you.
          CuocSongSo.com

          Comment

          • Steve Machol
            Former Customer Support Manager
            • Jul 2000
            • 154488

            #6
            That shouldn't happen with a good database backup and restoring to a fresh db.

            I would run this on the database:

            Admin CP -> Maintenance -> Repair/Optimize Tables -> Fix Unique Indexes

            Then make a new backup and try that.
            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

            • cuocsongso
              Member
              • Sep 2010
              • 49
              • 4.0.x

              #7
              Originally posted by Steve Machol
              That shouldn't happen with a good database backup and restoring to a fresh db.

              I would run this on the database:

              Admin CP -> Maintenance -> Repair/Optimize Tables -> Fix Unique Indexes

              Then make a new backup and try that.
              I don't know what happen to it. Because I'm use mysqldumper to backup it, I think it is good.
              Now I buy vbulletin suite and I upgrade finish. But I want to restore vbulletin 3.8 on localhost.
              So, I don't have any other backup.
              Hep me restore it, please!
              Can you give me other way?
              I need it.
              Thank you.
              CuocSongSo.com

              Comment

              • cuocsongso
                Member
                • Sep 2010
                • 49
                • 4.0.x

                #8
                Originally posted by Trevor Hannant
                Without knowing the table that entry is in (and the duplicate), it'll be hard to fix. Can you search for that key and let us know what the actual entry is?

                More infomation

                Click image for larger version

Name:	error.PNG
Views:	1
Size:	52.0 KB
ID:	3680404
                CuocSongSo.com

                Comment

                • Steve Machol
                  Former Customer Support Manager
                  • Jul 2000
                  • 154488

                  #9
                  Unfortunately we can already see that the backup is too damaged to restore. I'm afraid I don't have any other way around this. Are you saying you do not have access to the original db? If so, you might want to see if your host has a different backup available.
                  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

                  • cuocsongso
                    Member
                    • Sep 2010
                    • 49
                    • 4.0.x

                    #10
                    Originally posted by Steve Machol
                    Unfortunately we can already see that the backup is too damaged to restore. I'm afraid I don't have any other way around this. Are you saying you do not have access to the original db? If so, you might want to see if your host has a different backup available.
                    Yes.My database is upgraded up to 4.07 version of vbulletin.
                    I think that my host don't save old backup.
                    I try to use SQLDumpSplitter to split it. I don't know what is other way.
                    CuocSongSo.com

                    Comment

                    Related Topics

                    Collapse

                    Working...
                    😀
                    😂
                    🥰
                    😘
                    🤢
                    😎
                    😞
                    😡
                    👍
                    👎