It's not that hard, but I keep forgetting how to do it, so I wrote it down.
It's pretty simple, but something I've found myself looking for this a few times recently. Log into mysql as you normally would.
$ mysql -uroot -proot
This will give you the mysql prompt, at which you can enter:
mysql> SHOW DATABASES;
And you'll get your listing of databases! Make sure you use a semicolon to end that statement. It's easy to get caught up wondering why your command isn't executing.
Also, note you may use lower case here. In other words, this will work, too:
mysql> show databases;
If you repeat tasks over and over to setup new Ubuntu web development machines, perhaps you'll find some use in a script I wrote to solve this issue.