echo " MYSQL_STATEMENT" | mysql -u user_name -p  <database_name>  >>
/path/to/file


this should work fine on command line .


cheers
David Ziggy Lubowa
Network Engineer
One2net (U)
web: www.one2net.co.ug
Tel: +256 41 345466
-------------------------------------------
Every minute is an occasion to change your life

-----Original Message-----
From: Mike Doanh Tran [mailto:[EMAIL PROTECTED]
Sent: Monday, February 24, 2003 8:51 PM
To: [EMAIL PROTECTED]
Subject: redirect mysql output to file


Hi,

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.

thanks,

MT

---------------------------------------------------------------------
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


---------------------------------------------------------------------
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

Reply via email to