Import SQL data using phpMyAdmin Error: #1062-duplicate entry ' ...

Source: Internet
Author: User
Tags phpmyadmin

To import SQL data using phpMyAdmin error:

MySQL return: #1062-duplicate entry ' 0 ' for key ' PRIMARY '

This error occurs because the primary key of the data is duplicated, and the record shown in the error message has been imported ~ ~

Because the data update will be manually inserted in the corresponding location of a single or multiple pieces of data, so the data through the collation of the primary key after the self-increment is emptied, easy to manually insert data. In this way, when using phpMyAdmin to import SQL data, the above error will be reported, the solution is as follows: When importing data in the format of the import file do not tick do not give 0 value to use self-increment (auto_increment), This will automatically add values to the self-increment primary key when importing data. Of course, there will be no more error, the successful import.

Import SQL data using phpMyAdmin Error: #1062-duplicate entry ' ...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.