MySQL implementation of the AnySQL API (v0.2.1). Provides a unified interface for MySQL database operations, abstracting over the mysql driver. This package is part of the AnySQL ecosystem aimed at database-agnostic querying. It is stable but minimally maintained, with no recent updates since 2017. Differentiator: it offers a consistent API if you already use AnySQL for other databases, but standalone use is limited. Release cadence: sporadic.
npm install anysql-mysqlNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows creating a connection and running queries with parameterized inputs.
Use a separate connection pool or handle connections manually.
Use async/await or .then().
Use 'mysql2' driver or switch to a more modern library like 'mysql2/promise'.
Install @types/anysql-mysql if available, or create a declaration file.
Alter MySQL user to use mysql_native_password: ALTER USER 'user'@'host' IDENTIFIED WITH mysql_native_password BY 'password';
Install both packages: npm install anysql anysql-mysql
Use default import: import anySQL from 'anysql-mysql'; const db = anySQL({...});