Hello.


You may use --tee option of mysql to store the results in the file.

Or just redirect the output:

 mysql -uroot db_name < 'input_file' >'output_file'.



See:

  http://dev.mysql.com/doc/mysql/en/mysql-commands.html







[EMAIL PROTECTED] wrote:

> 

> Hi,

> 

>       What is the command to create log file while executing mysql

> command.

> 

>       I.e I want to run a file using mysql as follows

> 

>         Mysql -uroot db_name < "Inputfile"

> 

> 

>       I want to log the above results into a log file, to do the same

> what option I have to use here with mysql command.

> 

> 

>     PS: Input file contains some sql statements.

> 

> 

>    Please help me in this. This is very urgent.

> 

> Thanks,

> Narasimha

> 

> -----Original Message-----

> From: Gleb Paharenko [mailto:[EMAIL PROTECTED]

> Sent: Wednesday, March 09, 2005 11:16 PM

> To: mysql@lists.mysql.com

> Subject: Re: Access Denied

> 

> Hello.

> 

> Right. No need to FLUSH PRIVILEGES after GRANT.=0D

> 

> My fault, sorry.=0D

> 

> 

> Michael Stassen <[EMAIL PROTECTED]> wrote:

>>=0D

>> Gleb Paharenko wrote:

>>> Hello.

>>>=0D

>>> Execute FLUSH PRIVILEGES after granting.

>>> See:

>>>   http://dev.mysql.com/doc/mysql/en/flush.html

>>>   http://dev.mysql.com/doc/mysql/en/privilege-changes.html

>>=0D

>> Yes, please read this one.  FLUSH PRIVILEGES is NOT needed after

> GRANT,=0D

>> REVOKE, or SET PASSWORD.  You only need to FLUSH if you directly edit

> the=0D

>> grant tables (INSERT, UPDATE, DELETE).  Since he/she is using GRANT,

> FLUSH=0D

>> PRIVILEGES is unlikely to be relevant.

>>=0D

>>>   http://dev.mysql.com/doc/mysql/en/access-denied.html

>>>   http://dev.mysql.com/doc/mysql/en/user-resources.html

>>>=0D

>>> Connect to the server using mysql command line client using specified

> in GRANT statement

>>> username and password to check that the problem not in MySQL server.

> What output does the=0D

>>> following statement produce:

>>>=0D

>>>   SHOW GRANTS FOR 'metal-host'@'localhost';

>>=0D

>> Run this when it works, and then again when it doesn't.  If the result

> is=0D

>> different, then something is changing the privileges assigned to=0D

>> [EMAIL PROTECTED], so the solution will involve finding what is

> doing=0D

>> that.  If the privs are the same, then we need to look elsewhere.

> From the=0D

>> (not entirely clear) description, I expect the first case.

>>=0D

>>> What exact version of MySQL server do you use?

>>>=0D

>>> [snip]

>>>=0D

>>> Hello Gleb, no i m not doing flush..i dont even know what flush is.

>>> do u have anything in mind ?

>>>=0D

>>> [snip]

>>>=0D

>>=0D

>> Michael

>>=0D

>>=0D

>> Metal Host Contact wrote:

>>=0D

>> > I have installed in a single user called "metal-host" more than 10

>> > databases all with different names and in different php scripts

> (phpbb

>> > phpnuke mambo etc).

>> > the problem is that they only work as I install them,after some hour

> later

>> > all the scripts show me that error : Access denied for user:

>> > '[EMAIL PROTECTED]' (Using password: YES) ....

>> > then im trying to do : GRANT ALL PRIVILEGES ON somethign.* TO

>> > [EMAIL PROTECTED] IDENTIFIED BY "password"; and then each

> database that

>> > i re-give  the GRANT all command works perfectly..but for 1 minute

>> > only,then it gives me the same : Access denied for user:

>> > '[EMAIL PROTECTED]' (Using password: YES) .... So is there any

>> > limitation for the number of DBases that each user should

>> > run ?

>> >

>>=0D

> 

> 

> --=0D

> For technical support contracts, goto

> https://order.mysql.com/?ref=3Densita

> This email is sponsored by Ensita.NET http://www.ensita.net/

>   __  ___     ___ ____  __

>  /  |/  /_ __/ __/ __ \/ /    Gleb Paharenko

> / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]

> /_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.NET

>       <___/   www.mysql.com

> 

> 

> 

> 

> --=0D

> MySQL General Mailing List

> For list archives: http://lists.mysql.com/mysql

> To unsubscribe:

> http://lists.mysql.com/[EMAIL PROTECTED]

> 

> 

> 

> 

> Confidentiality Notice=0D

> 

> The information contained in this electronic message and any attachments to=

> this message are intended

> for the exclusive use of the addressee(s) and may contain confidential or=

> privileged information. If

> you are not the intended recipient, please notify the sender at Wipro or=

> [EMAIL PROTECTED] immediately

> and destroy all copies of this message and any attachments.

> 



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.NET http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Gleb Paharenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.NET
       <___/   www.mysql.com




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to