如何查看mysql event是否啟用
- 2019 年 12 月 10 日
- 筆記
查看事件是否開啟
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)