A lightweight Node.js CLI tool (v1.0.1) for converting Microsoft Access .mdb files (Access 97–2003) into portable SQL dumps. It has no system dependencies (no ODBC, no Java, no mdb-tools), works cross-platform (macOS, Linux, Windows), and outputs SQL with CREATE TABLE IF NOT EXISTS and batch INSERT statements. The tool is ideal for migrating legacy Access databases to modern SQL-based systems and is easily integrated into CI/CD pipelines via explicit exit codes (0, 1, 2, 3).
npm install mdb-to-sqlNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Run the CLI via npx to convert an .mdb file to a .sql file in the same directory.
Convert .accdb to .mdb using Microsoft Access or another tool first.
Manually replace backticks with double quotes for PostgreSQL or square brackets for SQL Server.
Review and adjust the generated SQL for non-standard types after conversion.
Upgrade Node.js to version 16 or higher.
Verify the file path and ensure the file exists. Use an absolute path if necessary.
Supply a file with .mdb extension. Convert .accdb to .mdb first.
Pass the path to the .mdb file as the first argument: mdb-to-sql ./path/to/file.mdb