I created a event in mysql but nothing happens. I set SET GLOBAL event_scheduler = ON; and it is running... I looked in the mysql database under log and it shows nothing.. I'm not even sure where to look. CREATE EVENT backupdb ON SCHEDULE EVERY 1 DAY STARTS '2013-01-20 03:15:00' DO SELECT * INTO OUTFILE '/var/www/html/files/backedup.csv' FIELDS TERMINATED BY ',' ENCLOSED BY '"' ESCAPED BY '\\' LINES TERMINATED BY '\n' FROM database.table; Code (markup): Any pointers or suggestions would greatly be appreciated.
I usually do the same via cron in Linux (or scheduled task in Windows): mysqldump -u <USER> -p<PASSWORD> dbname > /var/www/html/files/backedup.sql If you can't get the MySQL event working, I suggest this method instead. You can also more easily create backup archives this way: rm -f /var/www/html/files/backedup.sql.old; cp -a /var/www/html/files/backedup.sql /var/www/html/files/backedup.sql.old; (then insert the msyqldump command at the end) - this will create two copies effectively.