Check MySQL Event Scheduler Status & Enable It Temporarily
19.06.2025
The MySQL Event Scheduler is responsible for executing scheduled events (tasks) in the database. You can check its status and enable it temporarily if needed.
For closely related event scheduler topics, see MySQL Error #1227 — Event Scheduler, Enabling Permanently, Check Status & Enable Temporarily, and MySQL Event Scheduler — Complete Guide.
Check MySQL Event Scheduler Status
Run the following SQL query:
SHOW VARIABLES LIKE 'event_scheduler';
Possible Outputs
| Value | Meaning |
|---|---|
| ON | Event Scheduler is enabled and running. |
| OFF | Event Scheduler is disabled. |
Enable Event Scheduler Temporarily (Until Restart)
To enable the Event Scheduler for the current session (without restarting MySQL):
SET GLOBAL event_scheduler = ON;
- This will only last until MySQL restarts.
- Requires
SUPERorSET USERprivileges.
Verify If It Is Enabled
Run the status check again:
SHOW VARIABLES LIKE 'event_scheduler';
Expected output:
+-----------------+-------+
| Variable_name | Value |
+-----------------+-------+
| event_scheduler | ON |
+-----------------+-------+
If You Get an Access Denied Error
If you see:
#1227 - Access denied; you need (at least one of) the SUPER, SET USER privilege(s) for this operation.
You have two options:
- Ask the Database Administrator to enable it for you:
- Enable the Event Scheduler Permanently (if you have root access):
- Modify MySQL configuration file (my.cnf or my.ini).
- Add:
[mysqld] event_scheduler=ON- Restart MySQL:
sudo systemctl restart mysql
GRANT SUPER, SET USER ON *.* TO 'your_user'@'your_host';
FLUSH PRIVILEGES;
- To check status >
SHOW VARIABLES LIKE 'event_scheduler'; - To enable temporarily >
SET GLOBAL event_scheduler = ON; - To enable permanently > Modify my.cnf/my.ini and restart MySQL.


