Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

change Event Scheduler status in mysql

Tags:

mysql

I have 5 event Scheduler in my MySql data base. I want to stop one event Scheduler from them.

I have used below statements,

SET GLOBAL event_scheduler = OFF;
SET @@global.event_scheduler = OFF;
SET GLOBAL event_scheduler = 0;
SET @@global.event_scheduler = 0;

but it stops all 5 event Scheduler. Please help me for this.

Thanks in Advance.

Regards, Saurabh

like image 536
saurabh Avatar asked Sep 14 '11 07:09

saurabh


1 Answers

I think you mean that you have 5 events on one scheduler. Right?

Here is how you disable one event:

    ALTER EVENT myevent
    DISABLE;

Here is how you disable the entire scheduler (all events):

    SET GLOBAL event_scheduler = OFF;

All this can be read at http://dev.mysql.com/doc/refman/5.1/en/events.html How to disable one event is here http://dev.mysql.com/doc/refman/5.1/en/alter-event.html

like image 87
Andreas Wederbrand Avatar answered Oct 17 '22 13:10

Andreas Wederbrand