I found this wonderful output format for the MySQL CLI here. The command is mysql> pager less -SFX
. I would like this to be my default and not have to enter the command every time I start the MySQL CLI. How can I go about setting this as a default?
The pager can be set from the
mysql
client commandline with the--pager=
option.So one option is setting up an alias in your shell such that your custom pager is always set in your ~/.bashrc something similar to :
Alternatively any
--option=
commandline option can be set asoption=
in the relevant section of your personal~/.my.cnf
file. For instance: