To get database name you have to put this code in your phtml file and this phtml
file was called by the page where you want to showing it.
<?php echo Mage::getConfig()->getResourceConnectionConfig(‘default_setup’)->dbname;?>

Please leave your comment for asking any question or suggestion.
Need Help?