VLS MySQL is a lightweight TypeScript-native MySQL client for Node.js that provides a simple, promise-based API for executing queries and managing connections. Version 1.5.0 is the latest stable release, with periodic updates focused on reliability and compatibility. It differentiates itself by offering full TypeScript support out of the box, including generic query results, and a minimalistic design without unnecessary abstractions. Unlike heavier ORMs or legacy callback-based drivers, VLS MySQL focuses on direct SQL execution with type safety, making it suitable for projects that prefer raw SQL with typed returns.
npm install vls-mysqlNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to create a Mysql connection, run a typed SELECT query, and close the connection.
Change `import Mysql from 'vls-mysql'` to `import { Mysql } from 'vls-mysql'`Replace `.query(sql, callback)` with `const result = await mysql.query(sql)`
Use multiple Mysql instances for pooling or upgrade to v2 where pool support is planned
Always specify the type parameter: `mysql.query<MyType[]>('SELECT ...')`Change to `import { Mysql } from 'vls-mysql'`Add "type": "module" to package.json or switch to import syntax
Verify user, password, and host permissions in MySQL