• Resolved Dan Hughes

    (@dan-hughes)


    I’m new to WP and MySQL. I accepted the advice to update to the latest version and also followed the advice for backing up successfully. Now the site displays as it was before the backup and posts and changes have been lost. I then followed the advice below for restoring from backup.
    Restoring Your Database From Backup
    Across the top of the screen will be a row of tabs. Click the Import tab.
    On the next screen will be a location of text file box, and next to that a button named Browse.
    Click Browse. Locate the backup file stored on your computer.
    Make sure SQL is selected in the Format drop-down menu.
    Click the Go button.//
    I was surprised the advice did not provide for UPDATE or restoring the data so I was not surprised to receive the msg
    MySQL said: Documentation
    #1062 – Duplicate entry ‘1’ for key ‘PRIMARY’//
    I could just go back over the site, re-post and re-implement the changes but I would have the same problem next time I updated. I’ve searched the help files extensively and cannot find an instance of this particular problem. I’m reluctant to delete the databases with so little experience and would prefer to amend the backup by changing the INSET INTO in each instance but I don’t know what syntax to use. I tried UPDATE on its own, UPDATE INTO but now I am seeking professional help instead.
    Any other suggestion would be most welcome and perhaps the RESTORING instructions could be amended to help dummies like me.

Viewing 4 replies - 16 through 19 (of 19 total)
  • Thread Starter Dan Hughes

    (@dan-hughes)

    G’day James,I can see my error. It would have helped me if the backup instructions warned against taking the “Quick Backup” option, which is what I did with my backup.
    By taking the “Custom Option” option, the additional steps are revealed although they are out of date to some extent.
    The instructions say to tick the “structure” box but it is necessary to leave the default tick in the “STRUCTURE AND DATA” box in order to see all the boxes.
    It does not indicate to untick the “add CREATE PROCEDURE – FUNCTION – EVENT statement” box, which is ticked by default.
    In the absence of instructions either way, I did untick this and the backup worked, or at least did not malfunction.
    Any chance we could get these instructions amended as I will have forgotten this by the time I do it again.

    Moderator James Huff

    (@macmanx)

    Ah, I’ll see if I can put some better wording in. I would have assumed no one reading the instructions would have taken the quick option, as the instructions don’t say to take the quick option. ??

    Thread Starter Dan Hughes

    (@dan-hughes)

    James you should know better than to assume anything when dealing with dummies like me. Don’t forget to address the “add CREATE PROCEDURE – FUNCTION – EVENT statement” box. I still don’t know for sure if I should have unticked it or not. Cheers and thanks.

    Moderator James Huff

    (@macmanx)

    One difficulty with the specific boxes is that each host runs different versions of phpMyAdmin. We stick with documenting the oldest one around, so basically, if the guide doesn’t tell you to do something specifically, don’t do it.

Viewing 4 replies - 16 through 19 (of 19 total)
  • The topic ‘Restoring after update failed. Duplicate entry.’ is closed to new replies.