MySQL Forums
Forum List  »  Newbie

Re: overwrite / replace existing external.txt file
Posted by: Kai Voigt
Date: July 12, 2005 09:21PM

Short Answer: You have to remove the file yourself on operation system level before MySQL can create it again.

Long Explanation: MySQL won't remove existing files for various reasons. E.g. it prevents you from overwriting important files, like /etc/passwd on a UNIX system. Also keep in mind that MySQL is usually running under a non-privileged account and will create all files world-writable. So, it's basically security issues not to overwrite existing files.

Read http://dev.mysql.com/doc/mysql/en/select.html for more about the "into outfile" syntax.

--
Kai Voigt, Senior Instructor, MySQL AB
kai@mysql.com, www.mysql.com
Office: Kiel, Germany

Options: ReplyQuote


Subject
Written By
Posted
Re: overwrite / replace existing external.txt file
July 12, 2005 09:21PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.