1

I have a python application. I wanted to know whether there is any functionality(i.e. event or trigger) in mysql which will allow me to notify my python application when data is inserted in the database. I would like to avoid the use of polling because it will cause a large overhead on my database.

1 Answer 1

1

It's not directly for Python,but Is there a way to watch a mysql database for changes using perl? gives two option how to do that:

1.Create an audit table in the database, and have the trigger write the relevant info there; and have your watching application poll the audit table for new entries. You're still polling, but in a controlled way which won't hit the server too hard.

2.Have the trigger call an external app through a UDF.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.