MySQL Logo</img>

Continuing with some basic MySQL tips, we will now see how to list / Show databases.

We will use the command line to do this. First you need to connect the server son at the Linux command line prompt enter:

mysql -u root -p

I’m using root in this example, but you can use any user you have access to.

Next the server is going to ask for your password, and once you enter it you will the mysql prompt.


At the prompt enter:

show databases;

All databases your use has access to, will then be listed, something like this:

| Database           |
| information_schema |
| css-database       |
| wordpress1         |
| guillermo          |
6 rows in set (0.00 sec)

Now if you want to use one of the at the mysql prompt enter:

use [database];

In this example we can do:

use guillermo;

Now you can work with that database.