views:

23

answers:

1

I am using MySQL client interactively from a remote host. Is there anyway to mute the output of queries and save the output to a file instead?

Using tee command in MySQL can save the output to a file but can't disable echoing.

A: 

I found the solution using the pager command to start logging to a file instead of stdout and nopager to reset the default output:

pager cat >> my_output_file

mmonem
uhm? Just a simple redirect would have sufficed. `mysql >>outputfile` - no need for the pager.
Konerak
I am using mysql **interactively**
mmonem