I want to get magento's database configuration in any file within magento.
How do I do this?
Magento connection details u find out to below method..........
require_once ('../app/Mage.php');
$app = Mage::app('default');
$config = Mage::getConfig()->getResourceConnectionConfig('default_setup');
$dbinfo = array('host' => $config->host,
'user' => $config->username,
'pass' => $config->password,
'dbname' => $config->dbname
);
$hostname = $dbinfo['host'];
$user = $dbinfo['user'];
$password = $dbinfo['pass'];
$dbname = $dbinfo['dbname'];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With