Updated on 2024-10-14 GMT+08:00

Enabling or Disabling Event Scheduler

Scenarios

Event scheduler manages the scheduling and execution of events. The MySQL built-in event scheduler cannot guarantee the consistency of event statuses between primary and standby DB instances. If a failover or switchover occurs, events will not be scheduled. RDS for MySQL resolves this issue. With RDS for MySQL, even if there is a failover or switchover, the events will still be properly scheduled. You can simply enable or disable the event scheduler on the RDS console.

  • By default, the event scheduler is disabled after a DB instance is created.
  • After a primary/standby failover or switchover is performed, the event scheduler setting remains unchanged. The event_scheduler is on for the original primary DB instance and off for the original standby DB instance.
  • After a restoration to a new DB instance, the event scheduler setting is the same as that of the original DB instance.
  • After a single DB instance is changed to a primary/standby DB instance, the event scheduler setting is the same as that of the primary DB instance.

Constraints

  • To use this function, your RDS for MySQL kernel version must be at least 5.6.43.2, 8.0.17.4, or 5.7.25.2. If your database version does not meet this requirement, you can upgrade the minor version.
  • Event scheduler cannot be enabled for read replicas.

Enabling Event Scheduler

  1. Log in to the management console.
  2. Click in the upper left corner and select a region.
  3. Click in the upper left corner of the page and choose Databases > Relational Database Service.
  4. On the Instances page, click the instance name.
  5. On the Overview page, find Event Scheduler and click Enable under it.

    After the event scheduler is enabled, reactivate the previously created events to ensure that the event statuses on the primary and standby instances are the same.

Disabling Event Scheduler

  1. Log in to the management console.
  2. Click in the upper left corner and select a region.
  3. Click in the upper left corner of the page and choose Databases > Relational Database Service.
  4. On the Instances page, click the instance name.
  5. On the Overview page, find Event Scheduler and click Disable under it.

FAQ

What Should I Do If I Do Not Have the Permission to Change the event_scheduler Settings?

Answer: You can only enable or disable the event scheduler on the console. For details, see this section.