Forum Moderators: open
I SSH'd into the machine and started a MySQL session.
I want to output my queries to a text file. I opened help and it says to use -T to set a file and -t to unset it.
However I can't seem to get the syntax right. Can someone help me, I am not finding anything VIA search.
So I want my queries to output to /tmp/out.txt
I have tried
-T /tmp/out.txt;
-T '/tmp/out.txt';
-T /tmp/out.txt; select * from table;
Anyone know the magic phrase I need?
Please and thanks.
SELECT * FROM `table_name` INTO OUTFILE /path/to/file.txt
Refer to SELECT syntax for more information: [dev.mysql.com...]