今天在设置mysql数据库的event事件开启时发生如下错误:
Error Code: 1290. The MySQL server is running with the --event-scheduler=DISABLED
or --skip-grant-tables option so it cannot execute this statement
无法开启。后来弄明白了。当mysql安装在windows下时,默认是修改系统属性的权限是开启的。
当mysql装在linux系统下时,修改系统属性的开关是关闭的,需要手动修改配置文件:
在mysql安装的文件夹下找到配置文件my.ini,在[mysqld]的下面加上一句:event_scheduler=ON。这样mysql在启动的时候event sheduler就会自动启动了