SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Wizard
    Join Date
    Jul 2003
    Location
    Corner seat
    Posts
    1,069
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    MySQL question: Duplicate entry '*****' for key

    I'm trying to make a backup copy of some table, but I keep getting the following error:

    *******************************************
    SQL-query:

    INSERT INTO `phpbb_search_wordlist`
    VALUES (
    'fianc', 5703, 0
    )

    MySQL said: Documentation

    #1062 - Duplicate entry 'fianc' for key 1
    *******************************************

    As I check the row that has "fianc" and several rows that are in the neighborhood (after I sort in ascending order), I see these rows

    fewer 2091 0
    fianc 5703 0
    fiancee 4978 0
    fiancée 4592 0
    fiber 2859 0
    fibre 14062 0
    ficticious 3182 0

    As you can see, there is no duplicate entry. What's going on here? What is causing the problem and how can I fix it or get around it?

  2. #2
    SitePoint Addict Andrei P.'s Avatar
    Join Date
    Jul 2004
    Location
    New York, New York
    Posts
    231
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, I see a duplicate entry , second line:

    fianc 5703 0

    But it's duplicate if you are trying to insert another one. So, you are trying to restore the backup or you are exporting (making a backup)?

  3. #3
    SitePoint Wizard Lats's Avatar
    Join Date
    Jun 2003
    Location
    Melbourne, AU
    Posts
    1,142
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Check out the IGNORE option...

    http://dev.mysql.com/doc/mysql/en/INSERT.html
    Lats...

  4. #4
    SitePoint Wizard
    Join Date
    Jul 2003
    Location
    Corner seat
    Posts
    1,069
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Lats
    Check out the IGNORE option...

    http://dev.mysql.com/doc/mysql/en/INSERT.html
    Can you add IGNORE option as you export table from phpMyAdmin?

  5. #5
    SitePoint Wizard Dean C's Avatar
    Join Date
    Mar 2003
    Location
    England, UK
    Posts
    2,906
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Making backups via phpmyadmin isn't a reliable way of doing it. Assuming you have ssh/telnet access to your server follow this guideline:

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

  6. #6
    SitePoint Wizard
    Join Date
    Jul 2003
    Location
    Corner seat
    Posts
    1,069
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the reference, but I use phpBB. Is there any guide for phpBB?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •