Feb 14, 2012 -- posted by DarK
Horizontal Scrolling for MySQL queries in Linux
Everyone who works with databases on a linux terminal faces this issue at some point in time — executing select * on a table with too many columns. And in linux since there is no horizontal scrolling, the output is wrapped and hence completely unusable.
You can use
--pager
property to get rid of that text wrap.
Option 1
mysql -u<username> -p --pager="less -S" <database>
Option 2
Install a program known as “most”
sudo apt-get install most
And use this to invoke your mysql client
mysql -u<username> -p --pager="most" <database>
most is easier to use then less -S and the shortcuts makes it a breeze to run through all the data.
Note – Look the the bottom of the screen while running most to see Options or just read the man page.
If you any other option for viewing data on a terminal let us know!

Awesome.this kicks ass. I used to just do \G and limit for long rows which was PITA.
Nice! I didn’t know “most” and also was not aware of the pager option of mysql.