MySQL Pager

Ever worked on a MySQL server having table locking problems and when you run 'show full processlist' your screen is blasted with hundreds of lines of queries?  MySQL has a feature to help you parse this information easier with a feature known as a 'pager'

By default, MySQL will show the output of your commands to standard out, or your screen.  You can change this to utilize another utility or even a script that further interrupts the output.  For me, the most useful pager is simply setting it to less.  By setting the pager to less, those hundreds of lines of output from the process list can be searched and quickly navigated.

MariaDB [(none)]> pager less
PAGER set to 'less'

Now when you run a MySQL command, the output will be sent to less.  Try it out by looking at the InnoDB engine status

MariaDB [(none)]> show engine innodb status;

You will notice the output is sent to less which can be much easier to read and navigate.

For more information on setting the pager to custom scripts, check out these links with more information