5
I would like some tip on how to backup a mysql database with Event Scheduler.
I only got in my searches, find Event to back up tables individually.
I wish I could back up the whole bank, someone can help me?
(this code is just a test I’m running on localhost)
SET @sql_text =
CONCAT (
"SELECT * FROM ?i dont know? INTO OUTFILE 'C:\Users\Eiglimar\Desktop\backup_mysql"
, DATE_FORMAT( NOW(), '%Y%m%d')
, "BonInterne.csv'"
);
PREPARE s1 FROM @sql_text;
delimiter |
CREATE EVENT BackUpCSV
ON SCHEDULE EVERY 1 MINUTE
STARTS CURRENT_TIMESTAMP + INTERVAL 1 DAY
ENDS CURRENT_TIMESTAMP + INTERVAL 1 YEAR
DO
BEGIN
EXECUTE s1;
END |
delimiter ;
DROP PREPARE s1;
Man, thank you so much was in this cruel doubt, but to make recurring so just "schedule" there in the same ne Task Scheduler? Thanks again!
– Eiglimar Junior