Mike, > How do i redirect a mysql output to a file from the command line? > For example, I want to save DESCRIBE test_table > test_table.file > without doing a MYSQLDUMP.
To have the mysql client write a protocol, start it, and then do: mysql> tee myoutfile.txt Logging to file 'myoutfile.txt' mysql> tee Currently logging to file 'myoutfile.txt' mysql> notee Outfile disabled. Use a path for "myoutfile.txt" (or however you name it) if you don't want the file to be written in the directory you started mysql from. tee will append to your outfile, creating it if necessary. If it's there, tee will not overwrite its content. tee does not work in batch mode, and you cannot use it together with mysqlc.exe (for Win95/98). Regards, -- Stefan Hinz <[EMAIL PROTECTED]> iConnect GmbH <http://iConnect.de> Heesestr. 6, 12169 Berlin (Germany) Telefon: +49 30 7970948-0 Fax: +49 30 7970948-3 [filter fodder: sql, mysql, query] --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php