Create a connect.php file in root folder. and past the below code . now you are able to access Data base on this file.
1 2 3 4 5 6 7 8 9 10 11 12 | 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" ]; $con = mysql_select_db( $dbname ,mysql_connect( $hostname , $user , $password )); |