Registry / database / engined-mysql

engined-mysql

JSON →
library0.0.6jsnpmunverified

MySQL agent service for the engined framework, based on node-mysql2. Current version is 0.0.6 (pre-1.0.0). The package provides a simple way to integrate MySQL database access into engined service-oriented applications. Key differentiators: wraps mysql2 with engined's agent/context pattern, supports named agents, and uses promise-based queries. Active development appears slow, last release likely 2017.

npm install engined-mysql
INSTALL
IMPORT
SIG · ENGINED-MYSQL
E
engined-mysql
databasejavascriptv0.0.6
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
const MySQLService = require('engined-mysql')
import MySQLService from 'engined-mysql'
CommonJS only; no ESM exports.
MySQLService
const MySQLService = require('engined-mysql'); const db = MySQLService({...})
new MySQLService()
Export is a factory function, not a class.

Creates an engined manager, adds a MySQL agent with custom name and connection URI, then starts all services.

const { Manager } = require('engined'); const MySQLService = require('engined-mysql'); const mySQLAgent = MySQLService({ agentName: 'MyDB', uri: 'mysql://localhost:3306/mydb' }); const main = async () => { const serviceManager = new Manager({ verbose: true }); serviceManager.add('MySQLDB', mySQLAgent); await serviceManager.startAll(); }; main().catch(console.error);
Debug
Known issues
gotchaAgent name defaults to 'default' if not provided; you must use the same name when accessing via context.
fix
Always specify agentName explicitly to avoid confusion.
affects: >=0.0.0
deprecatedPackage uses older Node.js engine (>=7.4); may not be compatible with modern Node.js versions.
fix
Consider using a more up-to-date MySQL library.
affects: >=0.0.0
gotchaMissing TypeScript definitions; no types shipped.
fix
Use a type declaration file or @types package if needed.
affects: >=0.0.0
Errors
Common errors & fixes
Cannot find module 'engined-mysql'
Package not installed or not in node_modules.
fix
Run npm install engined-mysql
Error: getaddrinfo ENOTFOUND localhost
MySQL server not reachable or hostname incorrect.
fix
Check your MySQL connection URI.
TypeError: MySQLService is not a constructor
Using new keyword on the factory function.
fix
Remove new and call MySQLService({...}) directly.
Upgrade
Version history
0.0.6latest on npm
Audit
Dependencies
mysql2requiredunderlying MySQL driver
enginedrequiredpeer framework dependency for agent management
Agent activity
8 hits · last 30 days
node
6
Resources
engined-mysql — npm install engined-mysql · libregistry