Can I set a MySQL event schedule using phpMyAdmin?

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-28 06:02:06

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.

Select query browser in phpmyadmin run the query to ON event scheduler

SET GLOBAL event_scheduler = ON;

Only super privilege user can do this. To grand privilege to user by

GRANT EVENT ON myschema.* TO jon@ghidora;

Check event_sheduler status ON or OFF by

SELECT @@event_scheduler;

If status is ON go ahead for create event

CREATE EVENT e_store_ts
    ON SCHEDULE
      EVERY 10 SECOND
    DO
      INSERT INTO myschema.mytable VALUES (UNIX_TIMESTAMP());

To see the events that created

SHOW EVENTS;
Guy Chapman

If doing this on Amazon RDS you need to edit the parameter group to add EVENT_SCHEDULER = ON. One easy way to do this is via a free Rightscale account.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!