我有这个活动
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_",
DATE_FORMAT(NOW(),"%M-%d-%y_%h-%m-%s"), ".csv'",
"
FIELDS TERMINATED BY ','
ENCLOSED BY '\"\'",
"LINES TERMINATED BY '\\n\'",
"FROM mysql.general_log;");
PREPARE statement FROM @query;
EXECUTE statement;
END
但每次运行它都会给我这个错误
[ERROR] Event Scheduler: [root@%][ge.general_log] File '/Users/Admin/logs/log_03-05-13_04-03-54.csv' already exists
每次都是相同的确切错误。它不应该具有每次都应该更改的相同文件。