I have a client mysql command line running on Windows and I’m accessing a remote database. I want to export a text field into a file on the client computer because it is too large to read from the DOS command prompt window. My understanding is that this statement should work from the MySQL prompt, but it just gives an sql error.
SELECT * FROM mytable WHERE id = 5000 > test.txt;
Any ideas?
\h in the mysql client states:
tee (\T) Set outfile [to_outfile]. Append everything into given outfile.
So if you do this in the mysql client:
it should actually output the query result into test.txt.