Select the Gcore Platform

Gcore Edge Solutions
Go to Gcore Platform →
  • Edge Delivery (CDN)
  • DNS with failover
  • Virtual Machines
  • Bare Metal
  • Cloud Load Balancers
  • Managed Kubernetes
  • AI Infrastructure
  • Edge Security (DDOS+WAF)
  • FaaS
  • Streaming
  • Object Storage
  • ImageStack (Optimize and Resize)
  • Edge Compute (Coming soon)
Gcore Hosting
Go to Gcore Hosting →
  • VPS Hosting
  • Dedicated Servers
  • SSL Certificates


How to List Tables in a MySQL Database

Listing tables in MySQL is a crucial and routine operation necessary for understanding a database’s structure, performing maintenance and debugging, and manipulating data. Here, we’ll walk through how to list tables in MySQL.

To list all tables in a specific MySQL database:

1. Log into your MySQL server using the MySQL GUI tool or via the command line. Use the following command where the “-u” option specifies the username and the “-p” option prompts for a password:

mysql -u root -p

Replace root with your username.

2. If you know the name of your database, proceed to step #3. If you don’t, run the following command:


3. Select the database from which you want to list the tables using the following command:

USE your_database_name;

Replace your_database_name with the name of the database you want to use.

4.  List all tables in the database using the “SHOW TABLES” command:


Executing this command will show a list of all tables present in the selected database.

Note. If you want to obtain additional information about a particular table, such as its structure, including column names, data types, and default values, use the following command:

DESCRIBE table_name;

Replace table_name with the name of the table you want to explore.

Related learning articles

Subscribe to a useful newsletter

Favorable offers and important news once a month. No spam.