CSV to MySQL import tool for Node.js that uses multi-valued INSERT statements for performance. Version 1.0.3 is the current stable release; no recent updates indicate active development. It validates columns and skips extraneous columns, but does not create the target table. Depends on node-csv for parsing and node-mysql for database operations. Key differentiator: simple API for fast CSV imports with options like maxrows batch size and fixed additional data.
npm install csv-mysqlNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates using csv-mysql to import CSV string into MySQL table with connection options and callback.
Create the table in MySQL before calling cm.import().
Ensure CSV headers match MySQL column names exactly.
Use const cm = require('csv-mysql');Create the table in MySQL first.
Change import to const cm = require('csv-mysql');