0

I created some data files with 'outfile ' command.

The files are created in the mysql folder.{I use WAMP}
I want to create those files in another directory.

How can I do that?

Thankx in advance.

2
Contributors
4
Replies
6
Views
8 Years
Discussion Span
Last Post by jrosh
0

Mention the full path to the destination where you mention the file name e.g.

SELECT col1, col2 INTO OUTFILE 'c:\mysql\data.txt'
FIELDS TERMINATED BY ',' 
....

Edited by mwasif: n/a

0

Mention the full path to the destination where you mention the file name e.g.

SELECT col1, col2 INTO OUTFILE '/home/data.txt'
FIELDS TERMINATED BY ',' 
....

I used

SELECT * into OUTFILE  '/reports/1.txt' from test.table1;

And it says,

Can't create/write to file '\reports\1.txt' (Errorcode:2)

Please help

0

Sorry for that, I didn't realize that you are using Windows. You should use 'c:\mysql\data.txt' instead of the path I mentioned.

-1

Sorry for that, I didn't realize that you are using Windows. You should use 'c:\mysql\data.txt' instead of the path I mentioned.

gee thankx..

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.