content_image/684587.jpg
--event-scheduler=DISABLED 

•In the server configuration file ( my.cnf , or my.ini  on Windows systems), include the line where it can be read by the server (for example, in a [mysqld]  section): 

event_scheduler=DISABLED 

To enable the Event Scheduler, restart the server without the --event-scheduler=DISABLED command-line option, or after removing or commenting out the line containing event- scheduler=DISABLED  in the server configuration file, as appropriate. Alternatively, you can use ON  (or 1 ) or OFF  (or 0 ) in place of the DISABLED  value when starting the server. 

<img src='content_image/684587.jpg'>

## Note 

You can issue event-manipulation statements when event_scheduler  is set to DISABLED . No warnings or errors are generated in such cases (provided that the statements are themselves valid). However, scheduled events cannot execute until this variable is set to ON  (or 1 ). Once this has been done, the event scheduler thread executes all events whose scheduling conditions are satisfied. 

Starting the MySQL server with the --skip-grant-tables  option causes event_scheduler  to be set to DISABLED , overriding any other value set either on the command line or in the my.cnf  or my.ini  file (Bug #26807). 

For SQL statements used to create, alter, and drop events, see Section 25.4.3, “Event Syntax” . 

MySQL provides an EVENTS  table in the INFORMATION_SCHEMA  database. This table can be queried to obtain information about scheduled events which have been defined on the server. See Section 25.4.4, “Event Metadata” , and Section 26.3.14, “The INFORMATION_SCHEMA EVENTS Table” , for more information. 

For information regarding event scheduling and the MySQL privilege system, see Section 25.4.6, “The Event Scheduler and MySQL Privileges” . 

## 25.4.3 Event Syntax 

MySQL provides several SQL statements for working with scheduled events: 

•New events are defined using the CREATE EVENT  statement. See Section 13.1.13, “CREATE EVENT Statement” . 

•The definition of an existing event can be changed by means of the ALTER EVENT  statement. See Section 13.1.3, “ALTER EVENT Statement” . 

•When a scheduled event is no longer wanted or needed, it can be deleted from the server by its definer using the DROP EVENT  statement. See Section 13.1.25, “DROP EVENT Statement” . Whether an event persists past the end of its schedule also depends on its ON COMPLETION  clause, if it has one. See Section 13.1.13, “CREATE EVENT Statement” . 

An event can be dropped by any user having the EVENT  privilege for the database on which the event is defined. See Section 25.4.6, “The Event Scheduler and MySQL Privileges” . 

## 25.4.4 Event Metadata 

To obtain metadata about events: 

