A Node.js package that watches a MySQL database using binary log (binlog) parsing via ZongJi, allowing callbacks on table/column changes. v0.0.11, last updated 2016. Low maintenance, no recent releases. Alternative to polling-based watchers, but requires MySQL binlog enabled and appropriate privileges. Based on ZongJi (now unmaintained).
npm install mysql-eventsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Connects to MySQL, adds a watcher on a specific column for a value, and logs insert/update/delete events.
Use MySQLEvents(dsn) without 'new'.
Pass { startAtEnd: false } as second argument to MySQLEvents(dsn, { startAtEnd: false }).Use a 4-part pattern (db.table.column.value) to filter by a specific value, or use a regex as the third argument with a 4-part pattern.
Grant appropriate privileges: GRANT REPLICATION SLAVE, REPLICATION CLIENT, SELECT ON *.* TO 'user'@'host';
Evaluate alternative libraries such as 'mysql2' with binlog parsing or 'rplparse'.
Change to MySQLEvents(dsn) without 'new'.
Grant REPLICATION SLAVE and REPLICATION CLIENT privileges to the user.
Set binlog_format=ROW in MySQL configuration (requires restart).