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
59
votes
9 answers

Mysql Event Not Working

I have added the following simple test event on my mysql database via phpmyadmin: CREATE DEFINER=`root`@`localhost` EVENT `my_event` ON SCHEDULE EVERY 1 MINUTE STARTS '2013-05-27 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO BEGIN UPDATE…
Rana
  • 5,912
  • 12
  • 58
  • 91
32
votes
8 answers

Cronjob or MySQL event?

I have to update my MySQL database every hour, and I was wondering what the advantages/disadvantages of using a cronjob VS a MySQL event? For example, which is faster? Which is safer? Thanks!
Michael Eilers Smith
  • 8,466
  • 20
  • 71
  • 106
15
votes
3 answers

Can I set a MySQL event schedule using phpMyAdmin?

I want to increment a field on the first minute of every day, and then once it hits a certain value, set the value to 1. I would like to do this directly in MySQL, but preferably through phpMyAdmin. I am aware of the Event Scheduler, and so I'm…
Lars
  • 1,006
  • 1
  • 9
  • 29
11
votes
4 answers

Can we write multiple queries in a MySQL event?

I want to execute the following queries with help of Mysql event But when I add the delete statement in the event and try to create it, gives me Mysql Error. If I chose to skip the delete statement the event gets created without any problem. INSERT…
Aditya Achar
  • 173
  • 1
  • 1
  • 12
10
votes
4 answers

Autorunning Query in mysql

Is it possible to make a stored procedure that run every night 11 pm , check in table if any record is modified for last six month, If some record is modified for last six month I have to delete it from table. This has to run automatically without…
John Christy
  • 371
  • 3
  • 6
  • 22
7
votes
2 answers

How can i have MySQL log scheduled Events?

I've created an Event, but can't figure out how to log when it runs, how long it takes and if it has any errors. How do I do this? CREATE EVENT ON SCHEDULE EVERY 5 MINUTE DO BEGIN ...do something... END
Don Rhummy
  • 24,730
  • 42
  • 175
  • 330
5
votes
1 answer

How do I enable MySQL binary logging?

I tried to use simple example of mysql-events package but when i tried to use it , i got this error: Error: ER_NO_BINARY_LOGGING: You are not using binary logging so i changed my.cnf: # # The MySQL database server configuration file. # # You can…
erfan mehraban
  • 483
  • 3
  • 5
  • 13
4
votes
1 answer

Export only events from a MySQL database

As a part of a migration, I need to export MySQL events from a MySQL 5.6 cluster and import them in a MySQL 5.7 cluster Is copying the table mysql.event enough for this or is there any better way to export only events from a MySQL database?
ProT-0-TypE
  • 283
  • 2
  • 9
4
votes
3 answers

Why do mysql-event not working in node.js?

var MySQLEvents = require('mysql-events'); var dsn = { host: 'localhost', user: 'root', password: '' // no password set that's why keep blank }; var mysqlEventWatcher = MySQLEvents(dsn); console.log(mysqlEventWatcher); var watcher…
VIKAS KOHLI
  • 8,164
  • 4
  • 50
  • 61
4
votes
1 answer

How can I create a MySQL Event to automatically add newly moved image files from my laptop?

I'm trying to create a MySQL event so that I can have files automatically added to my MySQL database. Basically, I'm running an XAMPP server right now so all my website/database associated image files are inside the…
4
votes
1 answer

resetting column values after time

I am fairly new to phpmyadmin and SQL Databases. I would like to know how I can add a "script" that resets a value in all columns of a table after a certain time period -> I want the column to set the int value to 0 every 72hours for every row. Is…
Brinkhoff
  • 43
  • 1
  • 3
4
votes
3 answers

mysql - create event in store procedure

How to create event inside store procedure? This is what I been trying to do, and it tells me that I have a syntax error, only it doesn't tells me where. -- -------------------------------------------------------------------------------- -- Routine…
Ilya Gazman
  • 31,250
  • 24
  • 137
  • 216
3
votes
2 answers

creating recurring events in nodejs to update or insert MySQL table

I have a MySQL table tasks. In tasks, we can create a normal task or a recurring task that will automatically create a new task in the MySQL tasks table and send an email notification to the user that a task has been created. After a lot of…
zabusa
  • 2,520
  • 21
  • 25
3
votes
2 answers

MYSQL event on every 1 minute not working

First, this is OpenCart I have two tables: 1. oc_product (product_id, model, price, event_start, event_end and etc.) 2. oc_product_to_category (product_id, category_id) Every product has Start Date and End Date. I created MYSQL event that catch…
tweb
  • 123
  • 3
  • 12
3
votes
0 answers

How to create event in MySQL Workbench

I have problem with creating trigger in MySQL workbench. I read this post working with triggers and found there isn't any event part in UI interface of workbench but we can write event SQL query in work branch. I wrote it and run it but it doesn't…
Mehrnoosh
  • 62
  • 1
  • 1
  • 9
1
2 3
10 11