Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Make your voice heard. Take the 2019 Developer Survey now

Questions tagged [mysql-event]

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.

1
vote
0answers
28 views

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 ...
0
votes
1answer
15 views

Dropping rows based on the previous selection statmnet

I have a database with following tables: temp_1, temp_2.... and cached_tbl. Inside cached_tbl I have column table_name and in corresponding rows I store all the temp table names I mentioned above. SO ...
1
vote
3answers
115 views

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 ...
1
vote
1answer
108 views

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 ...
0
votes
0answers
58 views

Dynamic MySQL events implementation with triggers

I have a case in which MySQL event will get fired on time and date stored in the table with calculating from the CURRENT_TIMESTAMP and will automatically update the values using trigger. I have ...
-2
votes
1answer
82 views

Automatically update data every hour

I'm trying to understand how EVENTs work. Can someone explain the concept, preferably with a demo? I think this would update data every hour; am I correct? CREATE EVENT reset ON SCHEDULE ...
2
votes
3answers
497 views

`SHOW EVENTS` fail 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....
1
vote
1answer
319 views

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 ...
0
votes
0answers
434 views

How do you confirm a scheduled event is working?

Created an event using CREATE EVENT. It exists: +---------+-------------------------+----------------+-----------+-----------+------------+----------------+----------------+---------------------+--...
2
votes
2answers
666 views

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 ...
0
votes
1answer
509 views

Executing delayed inserts with MySQL event scheduler

A table that I'm working on, has two triggers; one is after insert and the other is before delete. These triggers carry out calculations and copy over some rows to a backup table. This backup table is ...
3
votes
1answer
2k views

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 ...
0
votes
3answers
224 views

Create a mysql event with condition [closed]

I currently have a mysql database where I keep data about rented books. When somebody rents a book, I save on the database an expiration date. So, I want to create an mysql event to update the book ...
0
votes
1answer
362 views

Event to update a column won't run

I have successfully created an event in MySQL to update a column called dob in a table called auth. My problem is that the event won't run. Here is my code: DELIMITER $$ CREATE EVENT ...
0
votes
1answer
370 views

MySQL Event Help - Update column value for each row every 15 minutes

Okay so if I have a login database: id | email | pass | attempts ---------------------------- 1 | "" | "" | 4 2 | "" | "" | 2 Attempts marks the number of attempts made at logging ...
1
vote
1answer
1k views

MySQL 5.6 - Creating an event inside a stored procedure

I am trying to create a procedure which create an event in MySQL. For example, something similar to this: delimiter // CREATE PROCEDURE schedule_my_db_job() BEGIN CREATE EVENT MY_DB_JOB ...
0
votes
1answer
87 views

Basics of creating a table and refreshing it via a mysql event

My apologies in advance for my display of ignorance. Is there a way for the event_body of an event to take the following: DROP TABLE IF EXISTS compdist1.comp_CL1; CREATE TABLE compdist1.comp_CL1 AS ...
1
vote
1answer
2k views

MySQL - Enabling Scheduled Event on Master and Slave Simultaneously

This may seem a bit strange, but I am trying to get a Scheduled Event to execute on both Master and Slave. I have two databases set up in a Master (A) to Master (B) replication environment. Master A ...
0
votes
2answers
11k views

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, `...
2
votes
1answer
5k views

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-...