I'm trying to export my tables from my MySQL database, horsedb, to text files. I have used the following code to export the first table, horse and there were no errors indicated in processing my code. However, I can't find the text file I've created. What am I doing wrong?
SELECT * FROM horse INTO OUTFILE 'C:\Users\Melgra\Desktop\horsefile.txt'
FIELDS terminated by ','
LINES terminated by '\r\n';
Query OK, 9 rows affected (0.01 sec)
Be careful on Windows machines, for \ you will need to double these \\ so C:\Users\Melgra\Desktop\horsefile.txt should read C:\\Users\\Melgra\\Desktop\\horsefile.txt or alternatively your can use single forward quote C:/Users/Melgra/Desktop/horsefile.txt