日期:2014-05-16 浏览次数:20811 次
-- 是不是 delimiter 没有设置成分号呢,先执行 delimiter ,再去执行你的语句试试: mysql-[lym]> delimiter ; mysql-[lym]> SET GLOBAL event_scheduler = ON; Query OK, 0 rows affected (0.00 sec) mysql-[lym]> SET @@global.event_scheduler = ON; Query OK, 0 rows affected (0.00 sec) mysql-[lym]> SET GLOBAL event_scheduler = 1; Query OK, 0 rows affected (0.00 sec) mysql-[lym]> SET @@global.event_scheduler = 1; Query OK, 0 rows affected (0.00 sec)
------解决方案--------------------
重新下个MYSQL 5.5安装试试,估计版本有问题
------解决方案--------------------
mysql-[lym]> delimiter ; mysql-[lym]> SHOW VARIABLES LIKE '%sche%'; +-----------------+-------+ | Variable_name | Value | +-----------------+-------+ | event_scheduler | ON | +-----------------+-------+ 1 row in set (0.00 sec) mysql-[lym]> SET @@global.event_scheduler = 0; Query OK, 0 rows affected (0.00 sec) mysql-[lym]> SHOW VARIABLES LIKE '%sche%'; +-----------------+-------+ | Variable_name | Value | +-----------------+-------+ | event_scheduler | OFF | +-----------------+-------+ 1 row in set (0.00 sec) mysql-[lym]> SET @@global.event_scheduler = 1; Query OK, 0 rows affected (0.00 sec) mysql-[lym]> SHOW VARIABLES LIKE '%sche%'; +-----------------+-------+ | Variable_name | Value | +-----------------+-------+ | event_scheduler | ON | +-----------------+-------+ 1 row in set (0.00 sec)
------解决方案--------------------
mysql> set global event_scheduler=1;
Query OK, 0 rows affected (0.00 sec)
------解决方案--------------------