Using MySQL to output the query directly to a text file is easy using the following command. mysql > select * from table INTO OUTFILE '/tmp/test.txt'; This is a useful feature if you have a query that will take a longtime or the results will overwhelm a small screen. Note: this command is not like a database backup or MySQL Dump.
|