MySQL Trigger

Is there any possible way to monitor MySQL Database? Like using Trigger when the new row is added?

I honestly do not know if there is a way to create a MySQL trigger Node. At least not in an efficient way. Some kind of polling would be possible but that would for sure not be the greatest experience. We will have to do some research.

Take a time. @jan If this is possible. It’s ok. Otherwise just drop it.

As @jan said, current trigger is by polling queries. This is how we currently check some tables.

Probably, a nice way could be enabling Binary Logs (writing in real time when something happens in Mysql).

@mcnaveen, looking on internet I have found this article

Perhaps it could be useful for your solution :wink:

3 Likes

This is Awesome buddy. Can we run inside Function Node?

Nope.

You need to send data to a pub/sub service and read by a compatible node.

Not sure if supported this “message broadcast tool like Redis’ Pub/Sub or RabbitMQ Pub/Sub”.

Typical pub/sub is Amazon SQS. But if volume is high (>1M/month) this could be costly.

Is there another option @jan?

I reply myself @mcnaveen.

You need to send events following sample to an mqtt or activemq service installed in your server and wait for events on n8n by adding mqtt or activemq trigger nodes to your flow.

Hope this helps.

Looks like this process is more complicated. Better I’ll drop this idea.

In MySQL there are something like TRIGGERS event, maybe it will help?

Possible to *“replicate” what Oipedream are doing maybe?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.