MySQL console: Redirect standard output

Last update on June 9, 2009 09:37 AM by jak58
Published by jak58

MySQL console: Redirect standard output







MySQL client command must be common to you (mysql), with this small tip you should be able to redirect the output commands to any program?

To do this, simply use the pager command, followed by the name of the program to redirect the output.
Example:
mysql>pager more
PAGER set to 'more'
mysql>


The next time the result of a command exceeds one page, you simply press the space bar to move from page to page:)

To return to the default pager, use the command "nopager":

mysql> nopager
PAGER set to stdout
mysql> 




Examples of use: (under Linux/Unix)
  • In order to search an item, ... in the output:


  mysql>pager vi - 
  • To view only the tables with a particular name (no case sensitive).



  mysql>pager grep -i name
      mysql>show tables;
Best answers for « MySQL console: Redirect standard output » in :
MySQL console on Windows: disable beep error Show MySQL console on Windows: disable beep error Issue Solution Issue When using MySQL console on Windows, each error causes a beep. Solution To disable it, you simply add the parameter-b in your connection string: mysql -b -h...
MySQL console: output files rather than a list Show MySQL console: output files rather than a list MySQL console: output files rather than a list The MySQL client command line is really powerful ... You may have already been confronted with the difficulty of reading results that...
Backup/Restore Mysql database Show Backup/Restore Mysql database Backup Restore your database Note A simple approach on how to backup and restore MySQL databases. Backup To save an existing database it is recommended that you create a dump. To dump all...
MySQL in console mode on Windows: disable the beep error ShowMySQL in console mode on Windows: disable the beep error When you use MySQL in console mode under Windows, each error causes a beep. Beleive me it can be very annoying!!! To disable it, you simply add the parameter-b in your connection...
Reinitializing the root password of MySQL ShowReinitializing the root password of MySQL The root password is lost! Reinitializing the password: It's important that you are able to access and modify the admin (root) password of MYSQL, either when installing MySQL for the first...
Vista Recovery Console bootable CD ShowVista Recovery Console bootable CD This may concern persons having a high end PC and are trying to have the recovery console for Vista. For those who have a high end PC with just a "Recovery” CD or DVD, here is a solution to have on...
Download MySQL Essential ShowMySQL 5.4 Essential which is recommended for most users is one of the world’s most popular open source database. Includes a configuration wizard for optimal use. It is the most trustworthy, secure and up to date version of most database. To know...
Linux - The shell ShowIntroduction to the shell The command interpreter is the interface between the user and the operating system, hence the name "shell". The shell therefore acts as an intermediary between the operating system and the user thanks to command lines...
The GSM standard ShowIntroduction to the GSM standard The GSM (Global System for Mobile communications) network is, at the start of the 21st century, the most commonly used mobile telephony standard in Europe. It is a so-called "second generation" (2G) standard...
The GPRS standard ShowIntroduction to the GPRS standard The GPRS (General Packet Radio Service) standard is an evolution of the GSM standard, and for that reason is sometimes called GSM++ (or GMS 2+). As it is a second-generation telephony standard that allows a...