How to backup table to local disk using mysql event -
i trying backup 1 database table local path .sql file using below mysql command,
create event backupin_home_directory_sqlfile on every 1 day starts '2015-10-14 16:10:00' select * outfile 'c:\users\username\desktop/backupcehcking.sql' testingdb.table_test;
but getting following error:
error 1064 (42000): have error in sql syntax; check manual corresponds mysql server version right syntax use near 'every 1 day starts '2015-10-15 13:10:00' select * outfile 'c:\users\user' @ line 1
what doing wrong?
as per answer changed command,
mysql> alter event backupin_home_directory_sqlfile select * outfile 'c:\ users\raghu_zanct\documents\dbbackup_checking\backupcehcking.sql' testing.m anitest; query ok, 0 rows affected (0.00 sec) mysql> alter event backupin_home_directory_sqlfile on schedule every 1 day start s '2015-10-15 15:28:00';
eventhough dont find backupcehcking.sql file in specific folder. why?
i think forgot schedule
use this:
create event backupin_home_directory_sqlfile on schedule every 1 day
example syntax:
create event event_name on schedule every 1 day comment 'optinal comment goes here' query;
Comments
Post a Comment