
Importing a CSV Into MySQL With a Header Row and Odd Quotes
Skip a header with IGNORE 1 LINES, then handle doubled quotes, backslashes, embedded newlines and Windows line endings that LOAD DATA treats differently.
The workhorse behind half the web. Queries, quirks and storage-engine lore for keeping it quick, correct and out of the pager.

Skip a header with IGNORE 1 LINES, then handle doubled quotes, backslashes, embedded newlines and Windows line endings that LOAD DATA treats differently.

Two switches control LOAD DATA LOCAL, one on the server and one on the client, each failing with its own error code. Enable both safely and know the risk.

Error 1290 blocks LOAD DATA INFILE and INTO OUTFILE outside one directory. Find the allowed path, move the file there, or switch to LOCAL and know the cost.

Every clause of LOAD DATA INFILE that matters for a CSV, from the tab default to NULL handling, with the output of each variant on MySQL 8.4.

LOAD DATA LOCAL turns bad values into warnings and still reports success. Import a CSV into MySQL safely, with a script that checks before it swaps.

An exported date shows as 45292 because Excel stores dates as numbers and the cell has no date format. See the cause, the code fix and a file repair.

Stop repair prompts, garbled accents and wrong columns when exports open in Excel: legal characters, sheet names, time zones, NaN, BOM and separators.

Build a job that queries a database, writes an Excel file and emails it on a schedule with smtplib and cron, with safe credentials and failure alerts.

Freeze the header row, add filter buttons and set column widths from Python with openpyxl and XlsxWriter, including an auto-width helper and print settings.

Write Excel formulas and number formats from Python with openpyxl and XlsxWriter: English syntax, cached values, table references, percent and date codes.

Build one Excel workbook from several SQL queries: a summary sheet, a sheet per region, formulas that point across sheets and an index with working links.

Export a MySQL query to a clean XLSX with PyMySQL and pandas, handling DECIMAL, zero dates, tinyint flags and utf8mb4, and compare it with Workbench.
We send one email when a new article is published. No spam.