惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
Tenable Blog
Last Week in AI
Last Week in AI
P
Proofpoint News Feed
Engineering at Meta
Engineering at Meta
H
Help Net Security
F
Fortinet All Blogs
MyScale Blog
MyScale Blog
宝玉的分享
宝玉的分享
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园 - 司徒正美
量子位
N
Netflix TechBlog - Medium
Apple Machine Learning Research
Apple Machine Learning Research
小众软件
小众软件
Recorded Future
Recorded Future
博客园 - 三生石上(FineUI控件)
Vercel News
Vercel News
aimingoo的专栏
aimingoo的专栏
I
InfoQ
Microsoft Security Blog
Microsoft Security Blog
Scott Helme
Scott Helme
The Last Watchdog
The Last Watchdog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
IT之家
IT之家
AI
AI
WordPress大学
WordPress大学
Security Archives - TechRepublic
Security Archives - TechRepublic
Google Online Security Blog
Google Online Security Blog
U
Unit 42
V2EX - 技术
V2EX - 技术
MongoDB | Blog
MongoDB | Blog
Schneier on Security
Schneier on Security
博客园 - Franky
H
Heimdal Security Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Jina AI
Jina AI
W
WeLiveSecurity
P
Privacy & Cybersecurity Law Blog
Cloudbric
Cloudbric
B
Blog RSS Feed
N
News | PayPal Newsroom
S
Securelist
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
I
Intezer
Hacker News - Newest:
Hacker News - Newest: "LLM"
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
博客园_首页
罗磊的独立博客
H
Hackread – Cybersecurity News, Data Breaches, AI and More
雷峰网
雷峰网

博客园 - 凌寒飘香

jquery getJSON bat 结束进程 mysql 行转列 ASP.NET连接Oracle数据库的步骤详解(转) mysql安装出现error Nr.1045 (转) windows服务(installutil.exe)报错。异常来自 HRESULT:0x80131515 NSIS堆栈 Push,Pop用法详解(转) bat,copy 文件 js ,String.format gridview模板页面调用js函数 执行带out参数的存储过程sql 无线网络配置 readexcel jquery.validate.min.js 打印配置 无线路由设置 pmi id 查询 天龙八部,小师妹,李沧海,齐御风 Windows Server 2008开机取消必须输入密码登录系统,不要按CTRL+ALT+DEL”,
mysql event
凌寒飘香 · 2013-08-08 · via 博客园 - 凌寒飘香

1.定时调用 存储过程

DELIMITER $$

ALTER DEFINER=`root`@`localhost` EVENT `event_stroke_ArchivesReportDataRefreshDaily` ON SCHEDULE EVERY 1 DAY STARTS '2012-01-01 00:10:00' ON COMPLETION NOT PRESERVE ENABLE DO CALL proc_stroke_ArchivesReportDataRefresh()$$

DELIMITER ;

2.定时执行sql语句

DELIMITER $$

ALTER DEFINER=`root`@`localhost` EVENT `event_stroke_ArchivesReportDataRefreshDaily` ON SCHEDULE EVERY 1 DAY STARTS '2013-08-08 14:49:00' ON COMPLETION NOT PRESERVE ENABLE DO INSERT INTO test(OrgID,valuetime) VALUES(3,NOW())$$

DELIMITER ;

mysql version   V5.5.12

打开开关

SET GLOBAL event_scheduler = 1;
SHOW VARIABLES LIKE 'event_scheduler';

但是关机后会还原为off

永久生效,需在my.ini设置如下

# SERVER SECTION
# ----------------------------------------------------------------------
#
# The following options will be read by the MySQL Server. Make sure that
# you have installed the server correctly (see above) so it reads this
# file.
#
[mysqld]

# The TCP/IP Port the MySQL Server will listen on
port=3306

event_scheduler = 1

重启mysql服务