HiveBrain v1.2.0
Get Started
← Back to all entries
patternMinor

MySQL: Show list of tables with paging in Terminal

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
showtablespagingterminalwithmysqllist

Problem

I am using MySQL Ver 14.14 Distrib 5.5.44 for debian-linux-gnu.

How can I show my tables page wise in a terminal?

Solution

You can use the pager (see docs) command in MySQL console or use the --pager startup option (docs again) to redirect the output of your commands to an external executable.

To use the pager command and list the tables try this:

mysql> pager less
mysql> show tables


You can also start MySQL to send all your output to an external executable like this

mysql --pager=/usr/bin/less

Code Snippets

mysql> pager less
mysql> show tables
mysql --pager=/usr/bin/less

Context

StackExchange Database Administrators Q#111897, answer score: 8

Revisions (0)

No revisions yet.