How can we ENABLE AND DISABLE a particular MySQL event?

MySQLMySQLi Database

With the help of ALTER EVENT statement along with ENABLE and DISABLE keyword, we can ENABLE and DISABLE the event. To illustrate it we are having the following example:

Example

mysql> ALTER EVENT hello DISABLE;
Query OK, 0 rows affected (0.00 sec)

The above query will DISABLE the event named ‘Hello’ and the query below will enable it.

mysql> ALTER EVENT hello ENABLE;
Query OK, 0 rows affected (0.00 sec)
raja
Published on 22-Feb-2018 08:06:52
Advertisements