Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using phpmyadmin on ubuntu to import a table, and I used this command

select * from questionresults into outfile 'training.txt'

to convert the table into text file, but I cant find where this file has been saved or maybe I don't have privilege to access it! does anybody know another way to convert it into text file or how to find the location of this file? I tried to export the table as text file but It comes with many symbols and I don't have time to pre-process the data.

share|improve this question

migrated from Jun 27 '11 at 16:43

This question came from our site for professional and enthusiast programmers.

click on export tab – Ibu Jun 27 '11 at 15:53

You can specify an absolute path:


select * from questionresults into outfile '/usr/test/training.txt'

The directory needs to be world writable on Linux.


select * from questionresults into outfile 'c:/test/training.txt'

Note the use of forward slashes even on Windows
On Windows you need to give MySQL (or everybody) write access to the directory, otherwise MySQL will not be able to write the file.

More info:

share|improve this answer

Depending on the setup (particularly if MySQL is running on a separate server), you may not be able to use INTO OUTFILE. You might be able to use a command-line alternative:

mysql db_name < query.sql > training.txt
share|improve this answer

You must log in to answer this question.