删除mysql开始事件,如何删除MySQL中的所有事件

If I want to delete some event I need to query something like

"DROP EVENT IF EXISTS eventname"

But I can't find the command of deleting all the events at one time,must delete event one by one.

Is there some SQL of deleting all events at one time?

"DROP EVENT IF EXISTS (SELECT EVENT_NAME FROM information_schema.EVENTS)"

is not working either.

解决方案

sample one:

DELETE FROM mysql.event

WHERE db = 'myschema'

AND definer = 'jon@ghidora'

AND name = 'e_insert';

if you can delete the event with DROP EVENT IF EXISTS and re-add it with the new scheduled time.

To permanently delete an event yourself, you can use DROP EVENT:

DROP EVENT [IF EXISTS] event_name

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值