2

Edit: I've figured out my MySQL version doesn't support it. I run 5.0.91, it requires 5.1 or so. I'm assuming the syntax is correct. Thanks for the help.

I've just created this mysql event that's supposed to be run every hour. However, I keep getting this error:

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'EVENT event_upcomingbattle ON SCHEDULE EVERY 1 HOUR STARTS CURRENT_TIMESTAMP' at line 1

This is my code:

DELIMITER //
CREATE EVENT event_upcomingbattle
    ON SCHEDULE EVERY 1 HOUR
    STARTS CURRENT_TIMESTAMP
    DO
        CALL update_upcomingbattle();
    END//
DELIMITER ;

Am I missing something stupid? The update_upcomingbattle() procedure exists.

3
  • do you have create perms? error is from create bit Commented Jan 26, 2012 at 9:38
  • What happens when you change the event name, or put it between `? Commented Jan 26, 2012 at 9:40
  • I've figured out my MySQL version doesn't support it. I run 5.0.91, it requires 5.1 or so. I'm assuming the syntax is correct. Thanks for the help. Commented Jan 26, 2012 at 9:41

1 Answer 1

2

The MySQL version I was using did not support events. Event support was added in MySQL 5.1.6. Instead, I was running 5.0.91. As soon as I updated MySQL, it started working.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.