The default settings for the MySQL command line client are a bit annoying. There’s no output paging; columns with more than 80 characters are wrapped making matching field name to field data difficult. Here’s a way to make life easier.
Reference: http://dev.mysql.com/doc/refman/5.0/en/mysql-commands.html (and from the comments therein)
You can set the PAGER variable several ways. In the following examples, I’m setting it to “less -niSFX”. Note that you must have “less” installed for this to work, and, according to the reference above, this doesn’t work on Win32, but you shouldn’t be running mysql on Win32 anyway ;).
In my.cnf (either in your home directory, or the system-wide file, whose location depends on your distribution):
From the shell:
$ mysql --pager="less -niSFX"
From within the mysql command line client:
mysql> pager less -niSFX
I haven’t yet found a way to set the pager behavior back to the default (i.e. no output paging) from the CLI prompt, so you’ll have to exit the CLI, remove these my.cnf changes or options from the command line and re-execute the client. I’ll edit this to reflect any new info.