Showing entries 1 to 9
Displaying posts with tag: Event Scheduler (reset)
Using MySQL Event Scheduler and how to prevent contention

MySQL introduced the Event Scheduler in version 5.1.6. The Event Scheduler is a MySQL-level “cron job”, which will run events inside MySQL. Up until now, this was not a very popular feature, however, it has gotten more popular since the adoption of Amazon RDS – as well as similar MySQL database as a service offerings where there is no OS level.

What is important to understand about the Event Scheduler is that it does not have any protection against multiple execution (neither does linux cron). Let’s imagine you have created an event that executes every 10 seconds, but the logic inside the event (i.e. queries or stored procedure call) can …

[Read more]
Making MySQL Better More Quickly

With the upcoming release of MySQL 5.7 I begin to see a problem which I think needs attention at least for 5.8 or whatever comes next. The GA release cycle is too long, being about 2 years and that means 3 years between upgrades in a production environment More people use MySQL and the data … Continue reading Making MySQL Better More Quickly

How to Enable MySQL Event Scheduler

You may think that you already know what's the opposite of "DISABLED", but with MySQL Event Scheduler you'll be wrong.

In fact MySQL Event Scheduler may have three different states[1][2]:

DISABLED -  The Event Scheduler thread does not run [1]. In addition, the Event Scheduler state cannot be changed at runtime.
OFF (default) - The Event Scheduler thread does not run [1]. When the Event Scheduler is OFF it can be started by setting the value of event_scheduler to ON.
ON - The Event Scheduler is started; the event scheduler thread runs and executes all scheduled events.

So if you're going to find it in the DISABLED state and instinctively set it to ENABLED you'll end up with a non-starting MySQL daemon.
Be warned and stay safe out there!

[2]: When the Event Scheduler is not running does not appear …

[Read more]
Event scheduler in MySQL 5.1

I just recently used Event scheduler which was the major feature in MySQL 5.1 version. Its very much similar to the linux crontab functionality. MySQL Event is nothing but a bunch of statements which we can run on specific schedule. When you will create any event, its just a database object like table, view or … Continue Reading

[Read more]
Regularly flushing the MySQL Query Cache without cron

This is a reply on Regularly flushing the MySQL Query Cache.

The original acticle is about regulary flushing the MySQL Query Cache as it will fragment over time.

There are some drawbacks for the cron method for flushing the query cache:

  • It will only work on UNIX like platforms as MS Windows uses the task scheduler to schedule tasks.
  • It needs credentials to login to the database.
  • It's not included in your database backup

There is another method, which is native to MySQL: the event scheduler.

Step 1: Enable the event scheduler:
mysql> SET GLOBAL event_scheduler=ON;

[Read more]
MySQL 5.1 Use Case Competition: Position 1

MySQL 5.1 is here! It’s announced! And it’s time for the overall winner, Position 1 in the MySQL 5.1 Use Case Competition.

1. Greg Haase (Lotame Solutions Inc., Elkridge, Maryland, USA): Using Partitioning and Event Scheduler to Prune Archive Tables. See Greg’s DevZone article, and his blog.

Thanks and congratulations, Greg! I absolutely hope you are in a position to take advantage of your free MySQL Conference & Expo 2009 Pass, including a dinner with MySQL …

[Read more]
MySQL 5.1 Use Case Competition: Positions 5 to 10

With the GA announcement of MySQL 5.1 coming up, we have picked the winners in the MySQL 5.1 Use Case Competition.

To keep you in suspense, let me first announce those on positions 5 to 10:

5. Fourat Zouari (, Tunis, Tunisia): Using Partitioning for Data Warehousing. See Fourat’s DevZone article, and his blog entry from May 2008.

6. Ryan Thiessen (Big Fish Games, Seattle, …

[Read more]
Using Scheduled Events in MySQL™ 5.1

[HoneyMonitor is a GUI for MySQL™. Server Administration, Database and Database Objects Administration, Code Development, Server Monitoring, Performance Monitoring, Performance Auditing. Read more on]

This is a short tutorial on the features implemented in HoneyMonitor for the use and administration of Scheduled Events . It could be useful for Users who are new to the product and want to get start with it or to whom want to learn the basis of Scheduled Events in MySQL™ 5.1

More details on the HoneyMonitor Reference Manual at



  • Introduction
  • The Scheduled Event Editor
    1. Performed Action
    2. Advanced
    3. Comment …
[Read more]
Event Scheduler

Part of updating the MySQL Certifications is trying out all the new features that have appeared with 5.1 and 6.0. Currently I am working with 5.1.24-rc on a Mac and 6.0 on Ubuntu and looking for items to add to the exams. The Event Scheduler is sure to become one of those Swiss Army Knife tools that we will wonder how we ever accomplished anything without.

I usually experiment with very simple tasks.

CREATE EVENT x1_event ON SCHEDULE AT '2008-07-16 14:01:01' DO INSERT INTO x1 VALUES (9,'nine');

SHOW EVENTS did exactly that. And just after 14:01, I found the new row in my x1 table.

So now I am thinking of a dozen think I used to do with cron(1) or at(1) that I could do with the event scheduler.

Warning: There are ramifications with backups and the event scheduler that I will not go into details here. But for now do not try to run your backups with event scheduler. The …

[Read more]
Showing entries 1 to 9