M.K BALAJI COT
M.K BALAJI COT

Reputation: 1

How to capture log for MYSQL event scheduler

I am new to MYSQL. I have one event scheduler for every 1 hour. Can we create log for every call when it was started and when it was finished and the status (success or failure). Pls help me.

Upvotes: 0

Views: 1195

Answers (1)

catalinetu
catalinetu

Reputation: 660

You can catch the errors with

DECLARE EXIT HANDLER FOR SQLEXCEPTION

or you can use GET DIAGNOSTICS which is available in MySQL 5.6.4

Make a log table and insert timestamps and error returned by handler

Upvotes: 1

Related Questions