如何查看mysql event是否启用

查看事件是否开启

MySQL [(none)]> show variables like 'event_scheduler';
+-----------------+-------+
| Variable_name   | Value |
+-----------------+-------+
| event_scheduler | OFF   |
+-----------------+-------+
1 row in set (0.02 sec)

开启事件

MySQL [(none)]> set global event_scheduler=on; //开启event需要root(SUPER privilege(s))
Query OK, 0 rows affected (0.05 sec)
MySQL [(none)]> show variables like 'event_scheduler';
+-----------------+-------+
| Variable_name   | Value |
+-----------------+-------+
| event_scheduler | ON    |
+-----------------+-------+
1 row in set (0.00 sec)

文章最后更新时间 : 2020年07月04日 18:47:32

评论已关闭