Event Scheduler Configuration •In MySQL, an event is uniquely identified by its name and the schema to which it is assigned. •An event performs a specific action according to a schedule. This action consists of an SQL statement, which can be a compound statement in a  BEGIN ... END  block if desired (see Section 13.6, “Compound Statement Syntax” ). An event’s timing can be either  one-time  or  recurrent . A one-time event executes one time only. A recurrent event repeats its action at a regular interval, and the schedule for a recurring event can be assigned a specific start day and time, end day and time, both, or neither. (By default, a recurring event’s schedule begins as soon as it is created, and continues indefinitely, until it is disabled or dropped.) •Users can create, modify, and drop scheduled events using SQL statements intended for these purposes. Syntactically invalid event creation and modification statements fail with an appropriate error message.  A user may include statements in an event’s action which require privileges that the user does not actually have . The event creation or modification statement succeeds but the event’s action fails. See Section 25.4.6, “The Event Scheduler and MySQL Privileges”  for details. If a repeating event does not terminate within its scheduling interval, the result may be multiple instances of the event executing simultaneously. If this is undesirable, you should institute a mechanism to prevent simultaneous instances. For example, you could use the  GET_LOCK()  function, or row or table locking. The default definer of an event is the user who created the event, unless the event has been altered, in which case the definer is the user who issued the last  ALTER EVENT  statement affecting that event. An event can be modified by any user having the  EVENT  privilege on the database for which the event is defined. See Section 25.4.6, “The Event Scheduler and MySQL Privileges” . •Many of the properties of an event can be set or modified using SQL statements. These properties include the event’s name, timing, persistence (that is, whether it is preserved following the expiration of its schedule), status (enabled or disabled), action to be performed, and the schema to which it is assigned. See Section 13.1.3, “ALTER EVENT Statement” . •An event’s action statement may include most SQL statements permitted within stored routines. For restrictions, see Section 25.8, “Restrictions on Stored Programs” . 25.4.2 Event Scheduler Configuration Events are executed by a special  event scheduler thread ; when we refer to the Event Scheduler, we actually refer to this thread. When running, the event scheduler thread and its current state can be seen by users having the  PROCESS  privilege in the output of  SHOW PROCESSLIST , as shown in the discussion that follows. The global  event_scheduler  system variable determines whether the Event Scheduler is enabled and running on the server. It has one of these 3 values, which affect event scheduling as described here. The default is  ON . When the Event Scheduler is  ON , the event scheduler thread is listed in the output of  SHOW PROCESSLIST  as a daemon process, and its state is represented as shown here: • ON : The Event Scheduler is started; the event scheduler thread runs and executes all scheduled events. mysql>  SHOW PROCESSLIST\G *************************** 1. row *************************** Id: 1 User: root Host: localhost db: NULL Command: Query Time: 0 4738