Get list of databases using MySQL Command line

Question
How do I get list of databases using the MySQL Command line?

Answer

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| dborc3_sqli        |
| drupal             |
| joomla             |
| mediawiki          |
| moodle             |
| mysql              |
| phpbb2             |
| phpmyadmin         |
| wordpress          |
+--------------------+
10 rows in set (0.01 sec)

mysql>

 Collapse All    Expand All
Custom Search

MySQL Information and Resources