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
2 answers

Schedule and update with count of a different table

i have 3 tables like this questions_table question_id | content | user | 1 | my first question | userOne@email.com | 2 | my second question | userTwo@email.com| replies_table reply_id | question_id|user …
kunz
  • 1,063
  • 1
  • 11
  • 27
0
votes
0 answers

Is there a way to create an event in mysql which should run on every first day on every month in Shamsi date not in gregorian date

I want to add some record in a database table in every first day of every shamsi month. The problem is that we can only set start date in gregorian as I know. Is there a way to do this, Please let me know
0
votes
1 answer

Stored procedure execution in background?

how to run mysql stored procedure behind the scenes without creating a loading website to wait for the results of the procedure to finish? DELIMITER $$ USE `simbakda_sensus`$$ DROP PROCEDURE IF EXISTS `info`$$ CREATE DEFINER=`potutu`@`%`…
0
votes
1 answer

Unable to change the serverId of a node client using @rodrigogs/mysql-events Zongji event listener

I am using @rodrigogs/mysql-events to listen to DB events on an mysql DB. So far works pretty well, except that I am getting the following error when I have more than one client listening to the DB: A slave with the same server_uuid/server_id as…
ChrisF
  • 57
  • 9
0
votes
0 answers

SQL Event doesn't run

ALTER EVENT reset_monthly ON SCHEDULE EVERY 1 MONTH STARTS '2019-01-01 00:00:00' COMMENT 'Descriptive comment' DO TRUNCATE sequence_code_os; This event fails to delete all rows of sequence_code_os monthly. Why ?
0
votes
0 answers

Show Event does not work in mysql after insert,Or no data save there

I tried to start working with events today. I wrote this : SHOW EVENTS FROM classicmodels; And it only return : No Rows (Why? It should shows shomething) Here is my sample event: CREATE EVENT test_event_02 ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL…
user10184524
0
votes
1 answer

How to SET an output value of a SELECT statement in mysql?

So, I am creating a mysql EVENT that computes the sales every month from transaction_tbl. I can't find the error I made. Here's my query: DELIMITER | CREATE EVENT compute_sales ON SCHEDULE EVERY 1 MONTH STARTS '2018-10-01 22:00.00' DO …
Cheryl Blossom
  • 185
  • 1
  • 13
0
votes
2 answers

Event Scheduler for temp tables and rows with their names

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 what I wanted to do is to create event scheduler…
Alisa
  • 13
  • 2
0
votes
0 answers

Can't open SQL script in MySQL Event Scheduler body

When I try open a script in the event scheduler with the source: c:/path/path/file.sql the following error occurs: mysql> CREATE EVENT `TEST_load_import_script_user` -> ON SCHEDULE EVERY 1 DAY STARTS '2018-10-01 11:09:00' -> DO source…
Alan Rellek
  • 247
  • 1
  • 8
0
votes
1 answer

'Select' and 'insert into' multiple rows by a My Sql event

I need to write a MySql Event to select some values from a table under some conditions and put those values in a second table. By the select statement. I get multiple rows, so I need to store data in the second table as a batch. How can I achieve…
ashen25
  • 29
  • 7
0
votes
1 answer

MySQL Event Scheduler

I have set 1 mysql events that transferring all data with 0 flag from one table to another (table 2) every 12 hours, then update query to set as 1 the flag after transferring. INSERT and UPDATE is on one event process. My problem is, all transferred…
Jeruson
  • 125
  • 11
0
votes
1 answer

Cron Job VS MySql Events

I have a question related to performance, speed and optimization. So I have a employee table. There is a field as joiningDate. I want to change employee designation after 3 months since employee joined. That means I have to run cron job every day as…
Asad Marfani
  • 177
  • 3
  • 13
0
votes
0 answers

Mysql event doesn't run

I am trying to set an event in my Mysql database that will run every minute to update a table. This is my code I put to run: UPDATE credit SET daily ='1000' WHERE Id=1 This is the message I get after I set the event CREATE…
LoveDroid
  • 75
  • 1
  • 10
0
votes
3 answers

Perform delete a perticular records after some interval of time in mysql

DROP EVENT `deleteTestEntries`; CREATE DEFINER=`root`@`localhost` EVENT `deleteTestEntries` ON SCHEDULE EVERY 1 MINUTE STARTS '2018-05-25 18:17:01' ON COMPLETION NOT PRESERVE ENABLE DO DELETE FROM lead_master WHERE lead_master.lname…
0
votes
1 answer

MySQl Events are not working

I am trying to use EVENTS in my project, So for testing purpose I created a table and created event for inserting data and scheduled that event for every 1min, So it has to insert data for every 1min but it is not inserting CREATE TABLE event_test…
Sat
  • 3,520
  • 9
  • 39
  • 66