当前位置:网站首页>MySQL regularly deletes expired data.
MySQL regularly deletes expired data.
2022-06-11 04:47:00 【Panbohhhhh】
Mysql
First step : Detect whether the event trigger is turned on .
Input show variables like '%event_scheduler%';

If it is OFF, You need to enter the code to open
Turn on event_scheduler sql Instructions :
SET GLOBAL event_scheduler = ON;
SET @@global.event_scheduler = ON;
SET GLOBAL event_scheduler = 1;
SET @@global.event_scheduler = 1;
After the open , You can edit the event .
everyday In the morning am Delete regularly surface test in 15 Days ago .
CREATE EVENT myevent
ON SCHEDULE EVERY 1 DAY STARTS '2009-03-25 02:00:00'
DO
delete from test where create_time <date_sub(curdate(),interval 15 day);
OK 了 .
边栏推荐
- What is the KDM of digital movies?
- Network adapter purchase guide
- Redis persistence (young people always set sail with a fast horse, with obstacles and long turns)
- Crmeb/v4.4 Standard Version open version mall source code applet official account h5+app mall source code
- 华为设备配置BGP/MPLS IP 虚拟专用网命令
- 华为设备配置通过GRE隧道接入虚拟专用网
- USB to 232 to TTL overview
- 梅州植物组培实验室建设资料整理
- C language test question 3 (program multiple choice question - including detailed explanation of knowledge points)
- Guanghetong advanced the fm160-cn project sample of the first 3GPP R16 industrial 5g module customized for China
猜你喜欢

Visual (Single) Object Tracking -- SiamRPN

华为设备配置本地虚拟专用网互访

USB to 232 to TTL overview

Differences between the four MQ

Commissioning experience and reliability design of brushless motor

Lr-link Lianrui fully understands the server network card

PCB ground wire design_ Single point grounding_ Bobbin line bold

华为设备配置通过GRE隧道接入虚拟专用网
![[Transformer]MViTv2:Improved Multiscale Vision Transformers for Classification and Detection](/img/97/a3e91e703b01aaceeb0d61545f9609.jpg)
[Transformer]MViTv2:Improved Multiscale Vision Transformers for Classification and Detection

Google Code Coverage best practices
随机推荐
Learning summary 01- machine learning
Bas Bound, Upper Bound, deux points
Record an ES accident
New UI learning method subtraction professional version 34235 question bank learning method subtraction professional version applet source code
Overview of construction knowledge of Fuzhou mask clean workshop
CoDeSys get system time
[Transformer]Is it Time to Replace CNNs with Transformers for Medical Images?
USB转232 转TTL概述
四大MQ的区别
Qt生成二维码图片方法
PostgreSQL数据库复制——后台一等公民进程WalReceiver 收发逻辑
Split all words into single words and delete the product thesaurus suitable for the company
Huawei equipment is configured with cross domain virtual private network
Commissioning experience and reliability design of brushless motor
SAVING AND LOADING A GENERAL CHECKPOINT IN PYTORCH
Free data | new library online | cnopendata data data of national heritage stores and auction enterprises
华为设备配置MCE
Carbon path first, Huawei digital energy injects new momentum into the green development of Guangxi
Leetcode question brushing series - mode 2 (datastructure linked list) - 160:intersection of two linked list
新库上线 | CnOpenData不可移动文物数据