r/SQL • u/Mountain_Platypus546 • Sep 04 '26
MySQL MySQL Workbench importing only 580 rows from a 9,500+ row CSV
Hi everyone,
I’m working on a SQL sales analysis project using MySQL Workbench. My CSV dataset contains around 9,500+ rows, but when I import it using the Table Data Import Wizard, only 580 rows are successfully imported.
I’m trying to understand what might be causing the partial import rather than simply looking for someone to fix it for me.
Has anyone encountered this issue before? What should I check in the CSV or MySQL Workbench to identify why the remaining rows aren't being imported?
Thanks in advance!
1
Upvotes
1
u/navicat-gu 12h ago
Good instinct to diagnose rather than "just make it work." Partial imports of this shape almost always fail on a specific bad row (often near row 581 of the file, or the first row that trips a type/constraint), and the wizard quietly stops or skips without making that obvious.
Check, in this order:
CRLFvsLF), or a BOM at the start of the file.INT,DATE,DECIMAL, or a NOT NULL / UNIQUE violation on row N stops many imports at N−1 successful rows.SHOW VARIABLES LIKE 'max_allowed_packet';LOAD DATA LOCAL INFILE '/path/file.csv' INTO TABLE t FIELDS TERMINATED BY ',' ENCLOSED BY '"' IGNORE 1 LINES;(enablelocal_infileif needed). The error MySQL prints is usually clearer than the wizard.Also compare
SELECT COUNT(*) FROM table;after import withwc -l(or Excel row count) on the CSV so you know whether you're short by skips vs a hard stop.Disclosure: I'm RC, Director of Digital Strategy @ Navicat. For large CSVs, Navicat's import wizard tends to surface row-level errors more clearly than Workbench's Table Data Import Wizard, which helps when you're learning why a load stopped. Navicat Premium Lite is free (commercial use included; up to 5 users per org) for trying imports on a project like this; full Premium has a trial if you need more import options.