How to adjust display settings of mysql command line?

To set the scrolling automatically add this to your my.cnf file in the [client] section like this:

[client]
pager = less -n -i -S

You can use the \G command (instead of the ;) at the end of your SQL queries...

Example:

SELECT * FROM USER \G

It will display your table in row form instead of column form.


In Microsoft Windows mysql Command Prompt, Right-click on the prompt boarder and select Properties, now select the Layout tab and change the Window Size width or screen buffer width to a more suitable view. That should fix the problem. enter image description here


mostly this happens when the row it fetches is too long. try playing with your terminal to have scroll bar and you could even reduce fonts.

The mysql option is

mysql> pager less -n -i -S