How to turn on MySQL scheduled events

Source: Internet
Author: User

How to turn on MySQL scheduled events(2012-07-26 12:21:23) reproduced
Tags: mysql event planning it Category: MySQL

First, query the status of the scheduled event in sql: SHOW VARIABLES like ' Event_scheduler '

If the return is off, the current is off, and if it is on, the scheduled task is currently turned on.

Locate the My.ini file in the MySQL program directory and add an entry: Event_scheduler = 1

After saving, restart the MySQL service, restart the service can be found in the service management

can also be implemented with a script:

MySQL Event_scheduler

To open the Event_scheduler SQL command:

SET GLOBAL event_scheduler = on;
SET @ @global. Event_scheduler = on;
SET GLOBAL event_scheduler = 1;
SET @ @global. Event_scheduler = 1;

Instead, close the Event_scheduler command:

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

How to turn on MySQL scheduled events

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.