I have added the following simple test event on my mysql database via phpmyadmin:
CREATE DEFINER=`root`@`localhost` EVENT `my_event`
ON SCHEDULE EVERY 1 MINUTE
If you want your event_scheduler
to startup automatically every time mysql server restarts, anywhere under the [mysqld]
section of the my.ini
or my.cnf
file that you find in /etc/mysql
you should place
[mysqld]
# turning on event_scheduler
event_scheduler=ON
restart mysql to check if it is running (in command line terminal!)
sudo service mysql restart
then check your processlist
SHOW PROCESSLIST
you can check if your events are running by checking the last time they ran
SELECT * FROM INFORMATION_SCHEMA.events