Get the App
SLTechnology News&Howtos  ›  Database  › 

The usage of MYSQL event Altimeter

Shulou Source: shulou.com Published: 2022-05-31 18:48:44 10月01日 Update

This article introduces the knowledge of "the use of MYSQL event altimeter". Many people will encounter such a dilemma in the operation of actual cases, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

To see if the event Scheduler is currently open

SHOW VARIABLES LIKE 'event_scheduler'

Www.2cto.com

Turn on the event altimeter

SET GLOBAL event_scheduler = 1

Create an event

Syntax:

CREATE EVENT [IF NOT EXISTS] event_name

ON SCHEDULE schedule

[ON COMPLETION [NOT] PRESERVE]

[ENABLE | DISABLE]

[COMMENT 'comment']

DO sql_statement

Example:

CREATE EVENT updateInfoStatus

ON SCHEDULE EVERY 30 MINUTE

DO

UPDATE `jd_ status` SET `status` = 0 WHERE `status` = 1 AND `date`

Tags: Events height information content examples more knowledge grammar practicality learning and then dilemmas realities situations articles cases editing websites industries processes Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology MariaDB Docker Huawei Shulou Tech Info