How to Fix MySQL Error 1087 (ER_LOAD_INFO)
MySQL triggers mysql error 1087 when a bulk data load finishes with status counts. You fix any issues by checking the warning log and cleaning your source file. This message uses the symbol ER_LOAD_INFO and the SQLSTATE value HY000. It reports how many records the server read, deleted, skipped, or flagged with warnings. In many cases, the database engine sends this string as an info summary. Still, strict client tools often treat non-zero warning or skip counts as a failure. When your import pi
Your coding agents run with your access.
Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.
MySQL triggers mysql error 1087 when a bulk data load finishes with status counts. You fix any issues by checking the warning log and cleaning your source file.
This message uses the symbol ER_LOAD_INFO and the SQLSTATE value HY000. It reports how many records the server read, deleted, skipped, or flagged with warnings. In many cases, the database engine sends this string as an info summary. Still, strict client tools often treat non-zero warning or skip counts as a failure. When your import pipeline halts on this code, you must inspect the row counts.
What causes mysql error 1087 during bulk imports
The database server produces the ER_LOAD_INFO message after running a bulk file import. The message template shows four numbers: Records, Deleted, Skipped, and Warnings. If Skipped and Warnings both equal zero, the load worked without trouble. A problem exists only when the server skips rows or logs data warnings.
Skipped rows happen when incoming data clashes with existing unique keys in the table. When your import rule tells the engine to ignore duplicates, it drops those rows. Instead of stopping the whole batch, the server adds to the Skipped counter. Conversely, the Deleted counter goes up when your import rule overwrites matching primary keys.
Warnings occur when fields in your text file do not match the table columns. A text string might be too long for a column, so the engine cuts it. A date field might hold bad characters, or a number column might receive letters. Extra or missing delimiters in a CSV file also push values into wrong columns. Each bad field adds one to the Warnings total in the ER_LOAD_INFO output.
How to diagnose and fix skipped rows and warnings
To find the exact failure, run a diagnostic query right after the load finishes. Ask the database session to show its recent warning list from memory. That output gives the exact row number and column name for every single issue. Read these messages before running another query, because new statements clear the warning buffer.
MySQL Access Governance + End-to-End Encryption: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Next, open your source data file and jump to the row numbers flagged earlier. Check the field delimiters, quote marks, and line endings around those specific lines. Make sure the file character encoding matches the character set of your target table. Fix any long strings, missing values, or bad date formats in the raw file.
Do not turn off strict SQL modes in production just to force data in. Turning off safety checks lets broken records corrupt your live tables. Also, never grant broad file privileges to standard app roles for bulk loads. Instead, test the cleaned file in a staging database until warnings drop to zero. Once the test run shows zero skipped rows and zero warnings, run it live.
Add wire guardrails and masking beside MySQL
Database grants and TLS setup decide who can reach MySQL. Even so, an open session can run broad updates or read raw personal data from allowed tables. In practice, hoop.dev sits inline in the wire protocol beside the database as a sidecar for your MySQL. On every production query an agent or engineer sends, hoop.dev decides to pass, mask, block, or escalate it for human review.
With hoop.dev MySQL support, guardrails refuse bad queries before they run or hold risky calls for approval, while data masking rewrites matched sensitive values in result rows in memory. Furthermore, hoop.dev holds SOC 2 Type II and generates evidence for GDPR, HIPAA, and PCI DSS programs. Read the docs and source on GitHub.
Frequently asked questions
Is ER_LOAD_INFO always a fatal database failure?
No, the server uses code 1087 as a summary message after loading data. It only signals a real problem if the skipped or warning counts exceed zero.
Why did my import skip rows without stopping the job?
Your import query told the engine to ignore duplicate key errors during the load. The server kept the old table rows and added the duplicates to the skipped count.
How can I see what caused the warnings in code 1087?
Query the session warnings right after the import finishes in the same database session. The server will list the exact reason and row number for each data issue.
Related guides
In this post