mysql error when importing tables

Asked

Viewed 1,330 times

1

When I import from 44 tables mysql returns me the following error:

#1062 - Duplicate entry '0000000001' for key 'PRIMARY'

Does anyone know what it can be? and how to solve?

  • What are you trying to import? Magento?

  • 1

    @marcosvinicius no, it’s just that I’m making a test bench, so I took the original export and now I’m trying to import

  • The destination bank is empty?

  • @bfavaretto yes

  • @Silvioandorinha the Primary is the column where it has the index, there the numbers cannot be repeated. Take a look at the data you are importing and verify that each table is going to the right place without duplicates.

  • This happened to me once before, and it was because I hadn’t put my primary key as autoincrement..

Show 1 more comment

1 answer

3


There is already a record with primary key 1, you are trying to reinsert data that already exist...

  • 1

    yes, but how to solve ?

  • You can clear the table before importing, if you are sure that the data is the same...

Browser other questions tagged

You are not signed in. Login or sign up in order to post.