List Tables in a MySQL Database - Best Methods ?

When working with MySQL databases, you usually have to list the database tables or perform some commands to retrieve the common information of DB as well.

Here at Ibmi Media, as part of our Server Management Services, we regularly help our Customers to perform related MySQL databases queries.

In this context, we shall look into how to list tables in the MySQL database by using the command line.

How to Show Tables in MySQL database ?

To begin, you have to connect to the MySQL server by running the following command:

$ mysql -u user -p

Let's take a quick look at an example below with user "linuxAPT":

$ mysql -u linuxAPT -p

In the MySQL shell, let's choose the database we will work on:

mysql> USE database-name;

In order to list all of the tables in the current chosen database, run the following command:

mysql> SHOW tables;

If you want to list the tables with their type, run:

mysql> SHOW FULL tables;

[Need assistance in fixing MySQL Database and table issues ? We can help you. ]


This article covers how to get information of the tables in the MySQL database. The following illustrates the syntax of the MySQL SHOW TABLES command: