MySQL jobs, scheduling tasks

This time we will see how to perform a scheduled task in MySQL (relatively speaking a job Oracle).

First we have to make sure we have the scheduler started with this we see:

Source   
mysql> SHOW processlist;
+----+------+-----------------+------------+---------+------+-------+------------------+
| Id | User | Host            | db         | Command | Time | State | Info             |
+----+------+-----------------+------------+---------+------+-------+------------------+
|  6 | root | localhost:49987 | assets_pru | Sleep   |  299 |       | NULL             |
|  8 | root | localhost       | assets_pru | Query   |    0 | NULL  | SHOW processlist |
+----+------+-----------------+------------+---------+------+-------+------------------+
2 rows IN SET (0.00 sec)

It is not started, for this we have to change a parameter of the mysqld section in my.cnf:

Continue reading