I am running the MySQL Workbench 6.2 CE on Windows7. I have an output table of 200,000 rows and I need to save it. I will have to repeat this task, so I would like to iterate the following code:
SELECT * FROM mytable
INTO OUTFILE 'mytable.csv'
FIELDS TERMINATED BY ','
OPTIONALLY ENCLOSED BY '"'
LINES TERMINATED BY '\n';
This saves my output but I cannot access it. It seems it is saved in the server database. I have the server installed in my desktop so I should be able to access it. Do you know how could I find the filepath to my saved csv files?
Edit1: I can save it manually in the Workbench GUI but I would like to find a code-based solution as I have to iterate this process many times.
Edit2: Putting all the file path doesn't work. It gives an error: Errcode: 13 - Permission denied
PS: Sorry if it is a basic question, I am new to MySQL.


...OUTFILE 'c:\mytable.csv'...-- that way you will know exactly where the file is.SELECT USER(),CURRENT_USER();. What is the output ?