Wednesday, April 17, 2013

MySql view database list, switch database and list tables

If you are running MySql form command line and you like to see list of all the database then simply run this command after login to the mysql

show databases;

this command will list all the database that are on MySql server.

If you like to work with one of the database then you can select the database with.

use database_name;

Once in the Database you like to see the list of the table use.

show tables;

This command will show the list of all the tables in that database.


No comments:

Post a Comment