puoi usare direttamente mySQL per vedere la lista dei database:
codice:
<?php
include ("config.inc.php");
$db = mysql_connect("localhost", "xxxx", "xxxxx"); 
$st=mysql_query("SHOW DATABASES") or die(mysql_error());
while ($row=mysql_fetch_assoc($st))
	echo $row['Database']."
\n";
?>