Can I set a MySQL event schedule using phpMyAdmin?(我可以使用 phpMyAdmin 设置 MySQL 事件时间表吗?)
问题描述
我想在每天的第一分钟增加一个字段,然后一旦达到某个值,将值设置为 1.我想直接在 MySQL 中执行此操作,但最好通过 phpMyAdmin.
I want to increment a field on the first minute of every day, and then once it hits a certain value, set the value to 1. I would like to do this directly in MySQL, but preferably through phpMyAdmin.
我知道事件调度程序,等等我正在寻找一种通过 phpMyAdmin 使用和管理它的方法.这可能吗?
I am aware of the Event Scheduler, and so I'm looking for a way to use and manage it through phpMyAdmin. Is this possible?
推荐答案
It is.. 只需从 SQL 框中发出适当的 CREATE EVENT
SQL.
It is.. Just issue appropriate CREATE EVENT
SQL from SQL box.
但是:您的 MySQL 服务器需要启用事件调度程序并具有数据库用户的 EVENT
权限.
However: your MySQL server needs to have event scheduler enabled AND have EVENT
privileges for the database user.
调用 SELECT @@event_scheduler;
会告诉您调度程序是否可用并已启用.
Calling SELECT @@event_scheduler;
will tell you if the scheduler is available and enabled.
要启用事件调度器(如果它被禁用,请尝试调用 SET GLOBAL event_scheduler := 1;
您需要 SUPER
权限才能成功.
To enable event scheduler if it's disabled try calling SET GLOBAL event_scheduler := 1;
You need the SUPER
privilege for this to succeed.
这篇关于我可以使用 phpMyAdmin 设置 MySQL 事件时间表吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:我可以使用 phpMyAdmin 设置 MySQL 事件时间表吗?


基础教程推荐
- 使用 VBS 和注册表来确定安装了哪个版本和 32 位 2021-01-01
- ORA-01830:日期格式图片在转换整个输入字符串之前结束/选择日期查询的总和 2021-01-01
- CHECKSUM 和 CHECKSUM_AGG:算法是什么? 2021-01-01
- MySQL根据从其他列分组的值,对两列之间的值进行求和 2022-01-01
- MySQL 5.7参照时间戳生成日期列 2022-01-01
- 带更新的 sqlite CTE 2022-01-01
- 从字符串 TSQL 中获取数字 2021-01-01
- 如何在 CakePHP 3 中实现 INSERT ON DUPLICATE KEY UPDATE aka upsert? 2021-01-01
- 带有WHERE子句的LAG()函数 2022-01-01
- while 在触发器内循环以遍历 sql 中表的所有列 2022-01-01