How to perform actions in C++ when you change data in a MySQL table?
There is a "smart house" project on the Raspberry Pi, for him, a program was written in Java under Android, it by pressing the button sends a query to MySQL table and changes her and Damon in C++ (that will stand for Raspberry pi) needs to poll the table for changes, and when detected, should give signals to the GPIO (pins of the Raspberry pi) how to apply the signals on the GPIO (which will drive relays, etc) I figured out, but how to get them to go only if you change the table I found ( they searched everywhere, StackOverflow, etc.)
Use MySQL Connector/C++ to connect to mysql and send queries based on the answers, do what you need.
Fredy.Kertzma answered on March 19th 20 at 08:43
If the Java program is not available to change, then you can try to hit with a trigger in MySQL that will write to an additional table logs changes then you will be able to deduct.
manuela.Schaden34 answered on March 19th 20 at 08:45
Not quite the answer to the question, but here it seems that the more appropriate solution using MQTT. Everyone who is subscribed to a particular topic will be instantly informed of the change. For Android already have customers in the market. For raspberyy is full of examples in any language to implement.