The most common way to get a list of the MySQL databases is by using the mysql client to connect to the MySQL server and run the SHOW DATABASES command.
$ mysql -u me -p [-h remotehost]
mysql> show databases
-> ;
+--------------------+
| Database |
+--------------------+
| information_schema |
[...]
This is a collection of techical information, much of it learned the hard way. Consider it a lab book or a /info directory. I doubt much of it will be of use to anyone else.