Re: mysql table dump problem
| From: | Markus Fischer | Date: | Sun, 21 Jan 2001 03:34:34 +0000 |
| Subject: | Re: mysql table dump problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-35873@lists.php.net to get a copy of this message | ||
On Sat, Jan 20, 2001 at 05:57:25PM -0800, PHP List wrote :
> dump a table to a file on my server:
> $sql = "SELECT * INTO OUTFILE '/tmp/test.txt' FIELDS TERMINATED BY
> '\t'
> LINES TERMINATED BY '\n' FROM table_name";
>
> Problem is that once I have created the dump file, it will not allow me to
> overwrite it and it gives me an error. Error = rm: cannot unlink
> `test.txt': Operation not permitted. It is owned by mysql:mysql. So it
> looks like it must be deleted by root or I need to change the ownership of
> the file so it can be deleted. So...
As i first shot, if you need it quickly to work, add a
random number to the text file.
Sorry, no more ideas, just a dirty hack.
m.
--
Markus Fischer, http://josefine.ben.tuwien.ac.at/~mfischer/
EMail: mfischer@josefine.ben.tuwien.ac.at
PGP Public Key: http://josefine.ben.tuwien.ac.at/~mfischer/C2272BD0.asc
PGP Fingerprint: D3B0 DD4F E12B F911 3CE1 C2B5 D674 B445 C227 2BD0