npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

n8n-nodes-mysql-trigger

v1.0.0

Published

Real-time MySQL Trigger community node for n8n using ZongJi Change Data Capture.

Readme

MySQL Trigger node for n8n

A real-time, event-driven MySQL Trigger node for n8n. This node leverages MySQL's binary logs (CDC / Change Data Capture) via the replication protocol, providing instant execution triggers without the latency or database overhead of polling.

Features

  • True Real-time Triggers (CDC): Powered by MySQL Binlog replication protocol. Triggers instantly upon table changes.
  • Flexible Event Monitoring: Listen specifically for INSERT, UPDATE, and DELETE actions (or any combination of them).
  • Granular Filters: Filter events by specific databases and comma-separated tables.
  • Data States: Provides the full event payload, including both the "before" and "after" row states for UPDATE events.
  • Auto-Reconnect & Fault Tolerance: Robust handling of protocol disconnects and connection losses with auto-retries.

Installation

From the n8n UI (Community Nodes)

  1. Go to Settings > Community Nodes.
  2. Click Install a community node.
  3. Enter the package name:
    n8n-nodes-mysql-trigger
  4. Check the agreement box and click Install.

MySQL Server Configuration (CDC Prerequisites)

Because this node acts as a replication replica to stream binlog events, your MySQL server must have binary logging enabled and configured for Row-Based Logging (RBL).

1. Enable Row-Based Binlogs

Add the following configuration to your MySQL configuration file (e.g., my.cnf or mysqld.cnf) under the [mysqld] section:

[mysqld]
server-id         = 1
log-bin           = mysql-bin
binlog-format     = ROW
binlog_row_image  = FULL

Restart your MySQL server to apply the changes:

sudo systemctl restart mysql

2. Create database user with Replication privileges

The user credentials used by the trigger node must have replication slave and replication client privileges. Run the following SQL queries as root:

CREATE USER 'n8n_cdc_user'@'%' IDENTIFIED BY 'your_secure_password';

-- Grant required replication permissions
GRANT REPLICATION SLAVE, REPLICATION CLIENT, SELECT ON *.* TO 'n8n_cdc_user'@'%';

FLUSH PRIVILEGES;

Parameter Configuration

  • Host: The hostname or IP address of your MySQL database.
  • Port: The port number of your MySQL database (Default: 3306).
  • User: The MySQL username (Must have REPLICATION SLAVE privilege).
  • Password: The password for the MySQL user.
  • Database: The database name you want to monitor.
  • Tables: (Optional) Comma-separated list of tables to watch (e.g., users, orders). Leave blank to watch all tables in the database.
  • Events: Multi-select option to trigger on Insert, Update, and/or Delete events.

Output Schema Example

The node outputs a structured JSON array representing the event payload:

INSERT event:

[
  {
    "action": "insert",
    "database": "my_store",
    "table": "users",
    "timestamp": 1718873099,
    "data": {
      "id": 42,
      "email": "[email protected]",
      "created_at": "2026-07-06T12:00:00Z"
    }
  }
]

UPDATE event (Includes Before/After):

[
  {
    "action": "update",
    "database": "my_store",
    "table": "users",
    "timestamp": 1718873105,
    "data": {
      "id": 42,
      "email": "[email protected]",
      "created_at": "2026-07-06T12:00:00Z"
    },
    "oldData": {
      "id": 42,
      "email": "[email protected]",
      "created_at": "2026-07-06T12:00:00Z"
    }
  }
]

License

MIT