MySQL Event Scheduler manages the scheduling and execution of events: Tasks that run according to schedule. Event support was added in MySQL 5.1.6.
Questions tagged [mysql-event]
33 questions
14
votes
1 answer
MySQL event scheduler waiting on empty queue since server restarted 12 days ago
I noticed a process on the server which has been running for more than 12 days, which I think coincides with the last time MySQL was restarted.
mysql> SHOW FULL…
BadHorsie
- 243
- 1
- 2
- 7
6
votes
1 answer
View MySQL Event Body
Is there a way to view the body of a MySQL event? The SQL part after the DO section? I can easily rename, enable, disable, even alter the schedule and the body separately, but exactly viewing what my event is doing, seems arduous to achieve.
The…
Kurt Van den Branden
- 347
- 2
- 5
- 13
3
votes
3 answers
"SHOW EVENTS" fails with "Error Code: 1545. Failed to open mysql.event"
I have a MariaDB 5.5.56 install (The default CentOS 7 package).
The VM was running on a host that had some problems reaching its storage. This resulted in the OS remounting some filesystems read-only.
The database is a replication slave and was…
Gert van den Berg
- 154
- 1
- 8
2
votes
2 answers
Creating Event that execute at end of each month
I need to create an event in mysql that runs at the end of every month 11 PM.I have tried creating an event that creates another events with code below:
DELIMITER |
CREATE EVENT `2014-10-31_CALL_ISRSP` ON SCHEDULE AT '2014-10-31 23:50:00'
DO…
Masoud
- 491
- 1
- 6
- 16
2
votes
2 answers
MariaDB event to automatically move data older than a specific time to another table without temporary table?
I am trying to setup an event, that automatically moves data older than a specified amount of time from a heavily used table to some "archive" table to improve performance.
So far I've only come across answers, that are based on a WHERE clause that…
Theo
- 135
- 7
2
votes
1 answer
Does MySql event will start if the previous event doesn't finish yet?
Example I have an event that will run every 5 seconds, then the first instance of the event is triggered but more than 5 seconds later the instances still not done executing. What will happen to the event would it execute again after 5 seconds even…
zer09
- 463
- 1
- 4
- 12
2
votes
1 answer
How to open a file in MySQL event scheduler?
I am currently creating my first event in MySQL:
CREATE EVENT check_for_uploads
ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 MINUTE
ON COMPLETION PRESERVE
DO
// I would like to open a .php file here
However I cannot find information on if its…
Tim von Känel
- 123
- 3
2
votes
1 answer
Restart event scheduler and alter event when slave being promoted to master
I am using innnodb cluster. It is good that every time a R/W node failed the R/O node will being promoted to R/W.
However I have to restart scheduler and alter event enabled (originally slave side disabled) manually for the cluster again. It…
Yen
- 193
- 2
- 3
- 11
2
votes
2 answers
Use event schedule and stored procedure to automatically average every hour MySQL
I have a database in Mysql Workbench about weather that updates every second. It contains temperature and wind speed. This is my database:
CREATE TABLE `test`.`new_table` (
`id` INT(10) NOT NULL,
`date` DATETIME NOT NULL,
`temperature` VARCHAR(25)…
Tia
- 21
- 1
- 1
- 5
1
vote
0 answers
Replicating/Inserting 300M MYSQL records from 6 Remote Servers on Local using Unique Identifier
I have 6 remote servers that dial phone numbers daily. I have a total record count of over 300 million combined and now I want to procress on them. The table data looks like this using this query
SELECT lead_id,
entry_date,
modify_date,
…
Aun Zaidi
- 111
- 3
1
vote
1 answer
MySql Event to Delete Data from 2 Tables Older Than 2 Months
Im new to MySql events and I never used them before so please to bear with me. With My DB I have order_details and invoices tables which I need to create an Event to delete all the records older than 2 months and where order_details payment_status =…
Ali Adil
- 113
- 4
1
vote
0 answers
MYSQL Event was executed but no effect to database
How do we troubleshoot MYSQL scheduled event that did not work as expected?
We got numerous events on our database.
All these event that have been scheduled and executed by event scheduler.
This event auto_delete_last_order_event would call a store…
xyonme
- 111
- 4
1
vote
3 answers
Event doesn't work
I have a working command:
UPDATE ads SET ad_points = ad_points - 20
And I would like to perform this action every day.
After creating the event in phpMyAdmin (MYSQL) nothing happens (on the next day, etc.):
CREATE EVENT daily_pointsmin
ON…
pnz1337
- 113
- 5
1
vote
0 answers
How do you confirm a scheduled event is working?
Created an event using CREATE EVENT.
It exists:
…
DrDamnit
- 203
- 1
- 4
- 12
1
vote
2 answers
Update files or a table every 5 seconds or for every update to a table whichever is the less frequent
There is a table 'votescount' which is being updated every time a user vote.
I need to display three rows with maximum votes.
Now the problem is If the users are less in number and less frequent to update, a trigger will be better to extract the…
Anubhav
- 21
- 1
- 8