![Trending Articles on Technical and Non Technical topics](/images/trending_categories.jpeg)
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How can we start MySQL event scheduler?
Actually, MySQL event scheduler is a process that runs in the background and constantly looks for the events to execute. But before we create or schedule an event we just have to start the scheduler. It can start with the help of the following statement −
mysql> SET GLOBAL event_scheduler = ON; Query OK, 0 rows affected (0.07 sec)
Now with the help of the following statement, we can check its status in MySQL process list −
mysql> SHOW PROCESSLIST\G *************************** 1. row *************************** Id: 3 User: root Host: localhost:49500 db: query Command: Query Time: 0 State: starting Info: SHOW PROCESSLIST *************************** 2. row *************************** Id: 4 User: event_scheduler Host: localhost db: NULL Command: Daemon Time: 11 State: Waiting on empty queue Info: NULL 2 rows in set (0.06 sec)
It can be turn off with the help of the following statement −
mysql> SET GLOBAL event_scheduler = OFF; Query OK, 0 rows affected (0.07 sec)
Advertisements