List:General Discussion« Previous MessageNext Message »
From:Ananda Kumar Date:July 30 2008 2:13pm
Subject:Re: spool log to a file
View as plain text  
Thank u, this works.

On 7/30/08, Jim Lyons <jlyons4435@stripped> wrote:
>
> Try:
>
> mysql -uroot -pxxx  -Dtest  -s -e  'select * from amc_25;' > aaaa1.txt 2>
> aaaa1.txt
>
> or
>
> mysql -uroot -pxxx  -Dtest  -s -e  'select * from amc_25;' > aaaa1.txt 2>
> aaaa1.errs
>
> This will redirect STDERR.  This works in Linux/Unix.  I don't know about
> windows.
>
> On Wed, Jul 30, 2008 at 1:51 AM, Ananda Kumar <anandkl@stripped> wrote:
>
>> The problem with below statement is that, if i there is any error in sql
>> statements it does not get written to aaaa1.txt. So, even if there is any
>> error, how can i get it written to aaaa1.txt.
>>
>> mysql -uroot -pxxx  -Dtest  -s -e  'select * from amc_25;' > aaaa1.txt
>>
>>
>>
>>  On 7/29/08, Mary Bahrami <mbahrami@stripped> wrote:
>> >
>> > I use
>> > mysql -uroot -pxxx  -Dtest  -s -e  'select * from amc_25;' > aaaa1.txt
>> >
>> > but it would be nice to see other solutions...
>> >
>> >
>> > -----Original Message-----
>> > From: Ananda Kumar [mailto:anandkl@stripped]
>> > Sent: Tuesday, July 29, 2008 6:37 AM
>> > To: mysql
>> > Subject: spool log to a file
>> >
>> > Hi All,
>> > I am executing below command, but there is no entires in aaaa1.txt, its
>> > an
>> > empty file. How can i write the logs into this file.
>> >
>> > mysql -uroot -pxxx  -Dtest  -s   --tee=aaaa1.txt -e  'select * from
>> > amc_25;'
>> >
>> > regards
>> > anandkl
>> >
>>
>>
>
>
>
> --
> Jim Lyons
> Web developer / Database administrator
> http://www.weblyons.com
>

Thread
spool log to a fileAnanda Kumar29 Jul
  • RE: spool log to a fileMary Bahrami29 Jul
    • Re: spool log to a fileAnanda Kumar30 Jul
      • Re: spool log to a filewalter harms30 Jul
Re: spool log to a fileAnanda Kumar30 Jul