# Enable/disable a mysql event

**URL:** <https://forum.inductiveautomation.com/t/enable-disable-a-mysql-event/10159>\
**Category:** Ignition\
**Created:** [June 23, 2015, 8:59am UTC](https://forum.inductiveautomation.com/t/enable-disable-a-mysql-event/10159 "2015-06-23T08:59:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![flavien](https://avatars.discourse-cdn.com/v4/letter/f/f475e1/32.png) [@flavien](https://forum.inductiveautomation.com/u/flavien)\
**Post date:** [June 23, 2015, 8:59am UTC](https://forum.inductiveautomation.com/t/enable-disable-a-mysql-event/10159/1 "2015-06-23T08:59:39Z")

</div>

Hello everybody,

Is it possible de enable or disable a mysql event using a python script ?

When I press a button I want to execute the following request : “ALTER EVENT myevent DISABLE”

Thanks,

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [June 23, 2015, 1:25pm UTC](https://forum.inductiveautomation.com/t/enable-disable-a-mysql-event/10159/2 "2015-06-23T13:25:20Z")

</div>

Sure. Although it doesn’t say so, the [system.db.runUpdateQuery()](https://support.inductiveautomation.com/usermanuals/ignition/system_db_runupdatequery.htm) function can be used for any SQL statement that doesn’t return a rows result set. So you can use a standard button, and put something like the following in the ‘actionPerformed’ event:`system.db.runUpdateQuery('ALTER EVENT myevent DISABLE')`
