A lightweight Node.js MySQL client plugin providing a simplified interface for database operations. Version 6.0.0 offers connection pooling, query building, and promise-based async/await support. Maintained as part of the qiao-z ecosystem, it focuses on minimal configuration and ease of use compared to more complex ORMs or full-featured drivers like mysql2 or knex. Release cadence is irregular with occasional major version bumps.
npm install qiao-mysqlNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to create a connection pool and execute a parameterized query using async/await.
Convert require() calls to import statements. Use dynamic import() if needed.
Migrate callbacks to async/await or .then() chains.
Replace `import mysql from 'qiao-mysql'` with `import { getPool, query } from 'qiao-mysql'`.Always provide complete config objects. Avoid mixing pool options.
Access data via destructuring: const [rows] = await pool.query(sql);
Run `npm install qiao-mysql` and use ESM import: `import mysql from 'qiao-mysql'`
Add `"allowSyntheticDefaultImports": true` to tsconfig.json or use named import: `import * as mysql from 'qiao-mysql'`
Upgrade mysql2 to latest version. In Node.js 8+ use: `ALTER USER 'user'@'host' IDENTIFIED WITH mysql_native_password BY 'password';`