MySQL listen notify equivalent

smk picture smk · Apr 12, 2014 · Viewed 14.8k times · Source

Is there an equivalent of PostgresQL's notify and listen in MySQL? Basically, I need to listen to triggers in my Java application server.

Answer

Tomasz picture Tomasz · Oct 25, 2014

Ok, so what I found is that you can make UDF functions in mysql that can do anything but need to be written in C/C++. They can be then called from triggers on updates in database and notify your application when update happened. I saw that there are some security concerns. I did not use it myself but from what I can see it looks like something that could accomplish what you want to do and more.

http://dev.mysql.com/doc/refman/5.6/en/adding-udf.html