how to run an event in Mysql under azure

Anthony Buitrago 25 Reputation points
2023-04-14T20:48:28.9633333+00:00

Hello I create an event in mySql server on Azure however the event is not raised, but if I made a replica database on my local machine the event is raised every day as expected On azure if i try to create again the event , I have an error , because the event is already created,

thank you in advance

CREATE EVENT TaskByDayEvent
  ON SCHEDULE     EVERY 1 DAY     STARTS '2023-04-15 09:39:00' ON COMPLETION PRESERVE ENABLE 
  DO     call bcproj.insertIntorestaskbyday();
Azure Database for MySQL
Azure Database for MySQL
An Azure managed MySQL database service for app development and deployment.
986 questions
{count} votes

Accepted answer
  1. GeethaThatipatri-MSFT 29,542 Reputation points Microsoft Employee Moderator
    2023-04-20T18:40:23.31+00:00

    @Anthony Buitrago I tried to repro and able to get event_scheduler working in both Single and Flexible Server. Set the server parameter event_scheduler to ON and follow steps from below documents, it should work.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.