Quantcast
Channel: MySQL Forums - MySQL Workbench
Viewing all articles
Browse latest Browse all 3724

Error Code 1062 during import (no replies)

$
0
0
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))

Viewing all articles
Browse latest Browse all 3724

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>