How To Disable the Running Event in MySQL?
Pre-requisites: create an event in MySQL, Events in MySQL
Events in MySQL are tasks that run according to a defined Schedule. events are executed based on schedule so it is also called a Scheduled event. In this article, we will talk about disabling running events.
Steps for Disable the Running Event in MySQL
Step 1: Firstly we need to check for All running events.
Step 2: In order to disable the running event. we can use ALTER statement.
ALTER EVENT event_name
ALTER EVENT LOG_QTY DISABLE;
Step 3: Now let’s verify whether the event is still running or not.
As we can see that now there is no running event.
Where this Can be used?
- Data analysis for analyzing user login activities and keeping that information only for a certain time.
- In data collection, E-commerce websites may use this event to collect purchase information of customers during the festival sale, and then they can disable these events.
So, this is how an event can be disabled we can create an event for a certain amount of time then we can disable it this way.
My Personal Notes arrow_drop_up
Please Login to comment...