Can I set a MySQL event schedule using phpMyAdmin?

Lars picture Lars · Jul 8, 2011 · Viewed 53.7k times · Source

I want to increment a field on the first minute of every day, and then once it hits a certain value, set the value to 1. I would like to do this directly in MySQL, but preferably through phpMyAdmin.

I am aware of the Event Scheduler, and so I'm looking for a way to use and manage it through phpMyAdmin. Is this possible?

Answer

Mchl picture Mchl · Jul 8, 2011

It is.. Just issue appropriate CREATE EVENT SQL from SQL box.

However: your MySQL server needs to have event scheduler enabled AND have EVENT privileges for the database user.

Calling SELECT @@event_scheduler; will tell you if the scheduler is available and enabled.

To enable event scheduler if it's disabled try calling SET GLOBAL event_scheduler := 1; You need the SUPER privilege for this to succeed.