I am interested in exporting the mysql select statement to a file on share samba. Everything works fine until I try to update the file. For example, I have mysql exporting to outfile peachtree.csv, and when the data changes, I want it to overwrite the old file with the new data, I get the error: ERROR 1086 (HY000): File '/ srv / samba / share / peachtree .csv 'already exists. Is there an option or switch that I can put in a statement to force or do this over the top of an existing file?
SELECT * FROM peachtree, INTO OUTFILE '/srv/samba/share/peachtree.csv' FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n';
source share