A lightweight MySQL query wrapper for Node.js that simplifies connection pooling and query execution. Built on top of node-mysql, it provides helper methods like get_one and get_all to reduce boilerplate code for common database operations. Current stable version is 1.0.3 (last updated 2011). Low release cadence; no longer actively maintained. Differentiates by offering three connection modes (direct, custom pool, built-in pool) and concise API for single-row or multi-row queries.
npm install easy-mysqlNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates direct connection, get_one, get_all, and execute methods using easy-mysql.
Migrate to modern MySQL client like mysql2 or @mysql/xdevapi.
Always check err before using results; use callback signature (err, result).
Use a custom pool with generic-pool for more control.
Use `const EasyMySQL = require('easy-mysql');` then call `EasyMySQL.connect(...)`.Ensure settings object includes host, port (default 3306), user, password, and database.