Recipe 1.23. Controlling mysql s Verbosity Level


Recipe 1.23. Controlling mysql's Verbosity Level

Problem

You want mysql to produce more output. Or less.

Solution

Use the -v or -s options for more or less verbosity.

Discussion

When you run mysql noninteractively, not only does the default output format change, it becomes more terse. For example, mysql doesn't print row counts or indicate how long statements took to execute. To tell mysql to be more verbose, use -v or --verbose. These options can be specified multiple times for increasing verbosity. Try the following commands to see how the output differs:

% echo "SELECT NOW()" | mysql % echo "SELECT NOW()" | mysql -v % echo "SELECT NOW()" | mysql -vv % echo "SELECT NOW()" | mysql -vvv             

The counterparts of -v and --verbose are -s and --silent, which also can be used multiple times for increased effect.




MySQL Cookbook
MySQL Cookbook
ISBN: 059652708X
EAN: 2147483647
Year: 2004
Pages: 375
Authors: Paul DuBois

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net