Ever wonder how to scroll upwards in mysl resultset ?

What if your terminal doesn’t allow scrollback or the scrollback buffer is somehow set to sreen lines ?

How to use MORE or LESS unix commands in mysql which would allow to scroll using ‘return’ or ‘spacebar’

Follow the steps given below:

[Invoke mysql using the --page command]

  1. mysql --page uuser -p  
  2. [set the pager to use less]

  3. mysql> pager less
  4. [run your query]

  5. mysql> select * from table_name

This also  works under the unix ‘screen’ terminal emulation

  • Share/Bookmark

One Response to “Pagination in mysql CLI”

  1. Dileep says:

    Good tips. I am really looking for soemthing like this..Thanks

Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

© 2010 Think Lamp Suffusion WordPress theme by Sayontan Sinha