A CLI tool and Node.js library for executing SQL files or inline statements, primarily for database initialization. Version 0.0.3 is the latest (and only) release, with no active development since 2014. It uses callbacks, runs on Node.js only, and connects to MySQL. Minimal error handling and no tests.
npm install execsqlNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to configure database connection, execute inline SQL, and run a .sql file with a callback.
Consider migrating to mysql2 or sequelize for modern projects.
Wrap calls in a Promise or use promisify.
Always chain .end() after exec/execFile calls.
Run 'npm install mysql'
Use 'const execsql = require("execsql")' (CommonJS).Check host, user, password; ensure MySQL is running and credentials are correct.