MySQL Forums
Forum List  »  MySQL Workbench

Error Code 1062 during import
Posted by: Craig Eidson
Date: December 27, 2018 07:04PM

I have a sql file that is ~173MB that I exported from an existing MySQL database. When I attempt to import this file using WorkBench 8.0 into my new MySQ (InnoDB) database on a different computer the export fails stating that the first record is a duplicate.

Upon doing some research I find that a couple thousand records were successfully imported including and beyond the first record that MySQL Workbench is complaining about. As a result I go back to my sql file and remove all INSERT statements through the highest reading_id (Primary key) found in my table and try the import again. Workbench continually imports 1,000 - 2,000 records but then errors out faulting the first record as a duplicate. Something must be wrong with a cache or memory setting but I don't know what. I don't understand why the import would insert my records then complain about the first record being a duplicate since it already imported it. The file is correct and does not contain any duplicate keys. Any thoughts on what might be limiting my import?


Example:

INSERT INTO `dut_sensor_reading` (`reading_id`, `sequence_num`, `msg_type`, `signal`, `signal2`, `battery`, `battery2`, `noise`) VALUES (127051884, 3, 0, 4.32, -0.4, 8.091, 0, 0);

Primary Key is reading_id (BIGINT (20))

Options: ReplyQuote


Subject
Views
Written By
Posted
Error Code 1062 during import
153
December 27, 2018 07:04PM
63
December 28, 2018 10:22AM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.