A simple MySQL query wrapper based on mysql2 and sql-easy-builder, providing automatic connection management, connection pooling (including cluster with master-slave separation), transactions, and debugging support. v4.3.0 is the current stable version. It is ESM-only since v4.0. Ships TypeScript types. Key differentiators: minimal configuration, built-in SQL builder for safe queries, easy clustering with pattern/selector support, and automatic connection release. Ideal for Node.js projects needing quick MySQL integration without a full ORM.
npm install mysql-easy-queryNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows complete setup of a single pool, inserting a record using the SQL builder, executing a raw query, and closing the pool.
Use import syntax or upgrade to a CommonJS-compatible version (v3.x).
Refactor to async/await.
Ensure all query async calls are completed before pool.end().
Double-check pool names in configuration.
Ensure transaction callback is async.
Change to import syntax: import { createPoolCompatible } from 'mysql-easy-query'.Verify the import: import { createPoolCompatible } from 'mysql-easy-query'. Also check that pool was created successfully.Ensure createPoolCompatible is called with proper config and that the promise is awaited if needed.
Check DB_HOST, DB_USER, DB_PASS, and DB_NAME environment variables or configuration.