Announcement

Collapse
No announcement yet.

sql importing problem

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

  • sql importing problem

    I got backup my forum and sql, uploaded to my new host my forum files
    and then when I try to import sql file via ssh, I get this error

    ERROR 1062 at line 9458: Duplicate entry 'sac' for key 2

    my sql file is about 600 mb

    what should I do?

  • #2
    P.S : I got backup from ssh with mysqldump command

    Comment


    • #3
      How did you upload the sql file? It should be uploaded in ASCII format.

      This error means there is something wrong with that backup. I suggest you go back to the original database and run repair/optimize on it. Then make a new backup with shell access via telnet or ssh. Please see the instructions here:

      Backup:
      http://www.vbulletin.com/docs/html/m...nce_ssh_backup

      Restore:
      http://www.vbulletin.com/docs/html/m...ce_ssh_restore
      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


      • #4
        I had uploaded it by cuteftp in auto-detect mode
        Ok, I'll redump database and upload in ascii mode

        thank you steve

        Comment


        • #5
          hi again,

          I ran repair/optimize and made a new backup via ssh
          then uploaded in ASCII mode
          but I still getting same error

          ERROR 1062 at line 9458: Duplicate entry 'sac' for key 2

          (while I running repair/optimize script, I see some errors, but also see "ok" message at the bottom of these errors)

          Comment


          • #6
            What are the errors, what command are you running exactly?

            It is best to run

            mysqldump --opt -uUSERNAME -pPASSWORD DATABASENMAE > /path/to/backup.sql

            Comment


            • #7
              Honestly I don't see how one could get this error on a database that has been repaired and optim ized:

              ERROR 1062 at line 9458: Duplicate entry 'sac' for key 2

              What are the exact errors you got during repair/optimize?
              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


              • #8
                firstly, I selected "check all" in repairing/optimizing section, then clicked "continue".
                I waited 2-3 minutes the page loading, page was loading and loading... then I saw "page not found" error on the right frame of admin page. Then I thinked that the big tables which has big file size could cause this "page not found" error, then I checked again tables without selecting big tables which are "attachment" , "post" , "postindex". I didn't select these 3 tables and I didn't see "page not found" error, but saw some other errors. But I think these errors not important, errors like that

                pm Check Status error: table in use or......
                pm optimize: optimized
                pm Optimize Status: OK

                I applied for "repairing and optimizing" now and saw no error like that all status are ok now.

                Comment


                • #9
                  Originally posted by Zachery
                  What are the errors, what command are you running exactly?

                  It is best to run

                  mysqldump --opt -uUSERNAME -pPASSWORD DATABASENMAE > /path/to/backup.sql
                  no errors for this command, I have already used this command to backup my forum and got the sql file, then downloaded it and uploaded to my new server.

                  the error is about sql importing while using this command

                  [email protected] [/home/public_html]# mysql -u econo -p MYPASSWORD econo < backup.sql
                  ERROR 1062 at line 438: Duplicate entry 'sac' for key 2

                  Comment


                  • #10
                    now I removed tables which I don't use anymore
                    only vb tables are left then check all for repairing
                    but same error "page not found"

                    could you advise me repairing them tables by tables
                    and importing tables by tables?

                    Comment


                    • #11
                      finally, I applied repairing and optimizing again now table by table without any problem for all my tables

                      now I want to backup again and try to import again
                      help me god

                      Comment


                      • #12
                        The messaage 'table in use' indicateds that table is still corrupted. It may take several runs of repair to completely fix this.

                        I suggest trying to repair these tables in phpMyAdmin instead.
                        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