可以使用phpMyAdmin设置MySQL事件进度吗? [英] Can I set a MySQL event schedule using phpMyAdmin?

查看:222
本文介绍了可以使用phpMyAdmin设置MySQL事件进度吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在每天的第一分钟增加一个字段,然后一旦达到某个值,将值设置为1.我想直接在MySQL中执行,但最好通过phpMyAdmin。



我知道事件调度程序,因此我正在寻找一种通过phpMyAdmin来使用和管理它的方法。这是可能的吗?

解决方案

它是..只是发布适当的 CREATE EVENT SQL从SQL框。



但是:您的MySQL服务器需要启用事件调度程序,并且具有 EVENT 权限数据库用户。



调用 SELECT @@ event_scheduler; 将告诉您调度程序是否可用并启用。 / p>

如果禁用,启用事件调度程序尝试调用 SET GLOBAL event_scheduler:= 1;
您需要 SUPER 此功能的成功。


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.

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.. Just issue appropriate CREATE EVENT SQL from SQL box.

However: your MySQL server needs to have event scheduler enabled AND have EVENT privileges for the database user.

Calling SELECT @@event_scheduler; will tell you if the scheduler is available and enabled.

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事件进度吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆