This package (v1.4.1) automatically tracks and logs MySQL database changes using triggers and events. It generates a configuration file upon installation and provides functions to initialize connections and set up auditing for specified tables. Suitable for Node.js environments with MySQL databases. Designed for audit compliance and change tracking. Released as a stable version with active updates. Differentiates by providing a non-invasive auditing mechanism.
npm install node-mysql-auditNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initialize MySQL connection and set up database auditing with user credentials.
Edit the generated configuration file (likely audit-config.json) to set database credentials.
Ensure the database user has CREATE TRIGGER, CREATE EVENT, and SELECT/INSERT/UPDATE permissions on the audit tables.
Set database credentials in the config file before calling initConnection().
Run npm install node-mysql-audit
Use import { initConnection } from 'node-mysql-audit'Update the configuration file with correct database host, user, password, and database name.