Questions tagged [mysql-event]

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

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

163 questions
0
votes
0 answers

Why a value set in event does not come over to the NEW.value in triggers?

In my event I have : UPDATE Xdb.shop_product_m2m as m2m SET m2m.expired=1 WHERE m2m.expires <= now(); And I tried this in the update trigger for the 'shop_product_m2m' table as : SET NEW.modified = NOW(); IF NEW.expired =1 OR…
edam
  • 910
  • 10
  • 29
0
votes
0 answers

Create a scheduled event on Mysql

I have and scheduled event on mysql. CREATE EVENT 'JOB_Act' ON SCHEDULE EVERY 12 HOUR STARTS CURRENT_TIMESTAMP DO (...) But i can't use current_timestamp. I know that I can set a future day and a hour. But I need to set, the current day and a…
Ferchi
  • 100
  • 1
  • 9
0
votes
1 answer

MYSQL Events not Running, Unable to turn on event_scheduler

My database (mysql) server is hosted on Mochahost.com . I have created an Event on my database, but its not running. I found that the event scheduler is turned off. I queried the following command SET GLOBAL event_scheduler = ON but it returned…
Abbasi
  • 588
  • 1
  • 7
  • 26
0
votes
1 answer

MySQL gives error in creating MySQL-Events

I am trying to create one MySQL event which updates the table at every midnight. My query is like this: CREATE EVENT postdetails_change_status ON SCHEDULE EVERY 1 DAY STARTS '2014-04-21 00:00:00' DO BEGIN UPDATE postdetails SET status =…
Sarjit Delivala
  • 567
  • 2
  • 13
  • 25
0
votes
0 answers

mysql and event scheduling at wrong time

I've set up an event in mysql to run every 24 hours starting 'tomorrow'. That's whats the event table is showing: db name body definer execute_at interval_value interval_field created modified …
Axel Amthor
  • 10,980
  • 1
  • 25
  • 44
0
votes
1 answer

MySQL event not triggering

I've created the following event, but for some reason it's not getting triggered: CREATE EVENT Del_logs ON SCHEDULE EVERY 1 HOUR DO TRUNCATE TABLE security.errors; Is there any log I could check to see what went wrong?
Cornwell
  • 3,304
  • 7
  • 51
  • 84
0
votes
1 answer

Mysql Event error out using to create general logs

I have this event CREATE DEFINER=`frontend`@`%` EVENT `general_log_event` ON SCHEDULE EVERY 5 MINUTE STARTS '2013-03-05 16:08:54' DO BEGIN SET @query = CONCAT(" SELECT * INTO OUTFILE '/Users/Admin/logs/log_", …
Dev-Ria
  • 329
  • 1
  • 7
  • 23
0
votes
1 answer

Error in MySQL Event: "execution time is in the past and ON COMPLETION NOT PRESERVE is set"

I am writing an event in MySQL. I want to execute the event in 1st day of the current month. My code: CREATE EVENT EVT_UP_COMPOFF ON SCHEDULE AT CAST(DATE_FORMAT(NOW(),'%Y-%m-01')as DATE) DO UPDATE tbl_compoff_leave_count set…
vps
  • 1,337
  • 7
  • 23
  • 41
0
votes
1 answer

MySQL 5.5 Create event gives syntax error

I have a problem creating EVENT. I have an 'articoli' table. There is a articoli.titolo field varchar (255) and when I try to create the event like this: CREATE EVENT inser_value ON SCHEDULE every 1 day DO INSERT INTO articoli (titolo) VALUES…
reeko_77
  • 3
  • 1
  • 5
-1
votes
1 answer

How to update my db automatically every day by inserting new record using existing data using event

I have a table 'accounts'. Every day I need to insert automatically new record for all users as opening balance (flag = OP). Opening balance amount is the previous day's last entry's cash in hand amount. How can I write an event for this? This is my…
-1
votes
2 answers

get Mysql Event status

I can get event in mysql by SHOW EVENTS LIKE 'e29' but it is giving all information. it is like select * from .... My need is that i want to get the STATUS of a particular event
Govind Singh
  • 15,282
  • 14
  • 72
  • 106
-2
votes
1 answer

Decrease No.of days by 1 daily from MySQL Column

I want to decrease the number of days by 1 daily. And update the remaining days in the same row and column. Below you can see my MySQL table : In the above image, you can see that I have a column "licence_validity" that contains the number of days…
DCodeMania
  • 1,027
  • 2
  • 7
  • 19
-4
votes
1 answer

Dynamically Create MySQL Event

My site allows users to create events, and I need those events deleted from the MySQL database after they occur. Hence, when the user creates their event I am trying to schedule an event in the database that deletes the user's event information soon…
1 2 3
10
11