A Node.js library wrapping the Go go-mysql package to provide MySQL binlog replication and a MySQL client connector. Version 0.3.4 is the latest stable release, with irregular updates as a wrapper project. Key features include synchronous-style async connection, binlog event parsing, and table filtering via regex. Compared to mysql2 and @mysql/xdevapi, it focuses specifically on binlog streaming and is not a general-purpose MySQL driver.
npm install go-mysql-jsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a MySQL binlog syncer, listens for row events, and handles cleanup on interrupt.
Install Go (>=1.16) and ensure node-gyp dependencies (python, make, C++ compiler) are available.
Use simple table name, e.g., 'Users' instead of 'mydb.Users'.
Check latest docs; consider using 'connectionUri' option if available.
Await the result: const syncer = await MysqlBinlog.create(...)
Run 'npm install go-mysql-js' and ensure no ESM/CJS mismatch in your bundler.
Use import MysqlBinlog from 'go-mysql-js' (ESM default) or const { default: MysqlBinlog } = require(...) (CJS).Install Go (>=1.16) and required build tools (python, make, C++ compiler).