MYSQL event height Server

Source: Internet
Author: User


For MYSQL event height server, check whether the event scheduler show variables like 'event _ scheduler 'is enabled. For www.2cto.com, set global event_sched = 1. Create event Syntax: create event [if not exists] event_nameON SCHEDULE schedule [on completion [NOT] PRESERVE] [ENABLE | DISABLE] [COMMENT 'comment'] DO SQL _statement; instance: create event updateInfoStatus on schedule every 30 minute do update 'jd _ article 'set 'status' = 0 WHERE 'status' = 1 AND 'date' <= now (); www.2cto.com: alter event event_name [on schedule schedule] [rename to new_event_name] [on completion [NOT] PRESERVE] [COMMENT 'comment'] [ENABLE | DISABLE] [DO SQL _statement] instance: alter event updateInfoStatus on schedule every 30 minute do update 'jd _ article 'set 'status' = 0 WHERE 'status' = 1 AND 'date' <= now (); delete event drop events if exists updateInfoStatus temporarily close event alter events updateInfoStatus disable enable event alter events updateInfoStatus ENABLE www.2cto.com view event details SELECT * FROM region WHERE EVENT_NAME = 'updateinfostatus' AND EVENT_SCHEMA = 'jdwc 'view all event show events view EVENT creation Information show create event updateInfoStatus author Zhou Hr

Related Article

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.