MySQL Error 1087 (ER_LOAD_INFO) is an informational message returned after LOAD DATA that reports how many rows were read, skipped, deleted, and warned.
MySQL Error 1087: ER_LOAD_INFO shows the row counts after a LOAD DATA INFILE or LOAD DATA LOCAL INFILE command. It is not a failure but an informational status. Read the result set or enable multiple-result support in your client to suppress the apparent error.
Records: %ld Deleted: %ld Skipped: %ld Warnings: %ld
MySQL raises error code 1087 with the symbolic name ER_LOAD_INFO after executing a LOAD DATA INFILE or LOAD DATA LOCAL INFILE statement. The server returns a message like “Records: 5000 Deleted: 0 Skipped: 0 Warnings: 3.”
The message is informational. It reports how many rows were processed, how many were silently deleted, which were skipped because of duplicate-key conflicts, and how many generated warnings.
Because it ships as an error packet, some connectors mistakenly surface it as an exception.
The server always emits ER_LOAD_INFO once a LOAD DATA statement finishes. No actual failure must occur. Client code that calls query(), exec(), or similar routines may see the packet and raise an exception if it does not expect multiple results.
Another trigger appears when the connection option CLIENT_IGNORE_SPACE is missing.
Some GUI tools interpret the returned packet incorrectly and label it as SQLSTATE HY000 “General error.”
Because ER_LOAD_INFO is informational, the fix lies in handling, not eliminating, the message. Update your client library or application logic so that it accepts multiple result packets and reads the OK packet that follows.
In popular drivers you can disable error-on-warning behavior or catch the specific SQLSTATE HY000 with error code 1087 and treat it as success.
In MySQL CLI, the message displays normally and requires no action.
Python mysqlclient and MySQLdb raise an exception after LOAD DATA. Wrap the call in try/except and inspect e.args[0]; ignore when it equals 1087.
PHP PDO returns a warning. Call $stmt->nextRowset() or enable PDO::MYSQL_ATTR_MULTI_STATEMENTS to consume the remaining packets.
Always test data-load code with the exact driver and server version used in production.
Check that the library supports CLIENT_MULTI_RESULTS.
Prefer LOAD DATA LOCAL INFILE with LOCAL keyword in client-side imports to minimize server-side file permission problems that can coexist with ER_LOAD_INFO.
Error 1148 (ER_LOAD_DATA_LOCAL_INFILE_DISABLED) appears when LOCAL is disabled. Enable local_infile system variable or remove LOCAL.
Error 1048 (ER_BAD_NULL_ERROR) fires if a NOT NULL column receives NULL during LOAD DATA. Provide a default or replace separators.
.
No. It is an informational message produced after a successful LOAD DATA command. Treat it like a status line.
Catch MySQLdb.Error, check if error code equals 1087, and ignore it or call cursor.nextset() to read the OK packet.
No. ER_LOAD_INFO does not change transaction state. COMMIT or ROLLBACK continues to work normally.
Yes. Galaxy’s built-in MySQL driver consumes multi-result packets automatically, so ER_LOAD_INFO never surfaces as an exception inside the editor.