0

I need to call bash script when mysql database schema has changed. As example queries:

ALTER TABLE, CREATE TABLE, DROP TABLE

it possible?

2
  • Possible duplicate of Run python script on Database event Commented Jul 4, 2017 at 16:42
  • How soon do you need to know that a change has occurred? You might have to switch to a DBMS that supports DDL triggers if the answer is "instantly" Commented Jul 4, 2017 at 16:44

1 Answer 1

1

Don't think that's possible any way. You could have probably use a DDL Trigger but MySQL doesn't support one. See worklog https://dev.mysql.com/worklog/task/?id=2418.

Though you can write a stored procedure to perform the business logic and call that procedure but capturing the DDL event isn't possible AFAIK. You should also check on Event Scheduler in MySQL

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.