A minimal async/await wrapper around the standard `mysql` package for Node.js (v1.0.3). It provides three simple functions: `makeDb`, `db.connect`, `db.query`, and `db.close`. Unlike alternatives like `mysql2` or `mysql2/promise`, this library keeps the familiar `mysql` API but returns promises. It has no additional dependencies beyond `mysql`, but does not support TypeScript types out-of-the-box. Low release cadence; last update was in 2020.
npm install mysql-async-simpleNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows async/await usage with mysql-async-simple: create connection, wrap with makeDb(), connect, query, close.
Always pass the connection object as first argument: await db.query(connection, sql).
Call const db = makeDb() before using db.connect().
Install the peer dependency: npm install mysql mysql-async-simple
Switch to mysql2 (which has built-in promise support) or use mysql-async-simple with mysql2 if compatible, but prefer native promise API.
Use require() or transpile with Babel/TypeScript.
First call const db = makeDb(), then use db.query(connection, sql).
Start MySQL service or check host/port in connection options.
Ensure const db = makeDb(); is executed successfully.