How To

List the tables in a MySQL database

This post is a how-to on getting the list of tables in a MySQL database using mysql command line client.

1. Connect to your MySQL database using your MySQL client


$ mysql -u root -p

2. Now you are logged in, tell MySQL which database you want to use


mysql> use database_name

3. Issue the MySQL show table command from command line


mysql> show tables;

What I got when I used this command in my table

Show Tables
Show Tables

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s