If you want to show, how many databases in MySQL just simply run the following command.

Login to MySQL

login to your MySQL using username and password

C:\xampp\mysql\bin>mysql -u root -p

it will ask you password enter your password and login.

Show databases

it will return how many databases in MySQL

MariaDB [rathorji]> show databases;


| Database           |
| ci-tutorial        |
| information_schema |
| mysql              |
| performance_schema |
| php-ajax-tutorial  |
| php-tutorial       |
| phpmyadmin         |
| rathorji           |

Use Database

There is list database but we you want to use it.

USE database_name;

if you want to use php-tutorial database then you can execute query like this.

USE php-tutorial;

Show tables

now you have chosen database but you want to see table list in your database.


 it will show you list of tables of selected database.