How to edit Magento database configuration file?

The editing Magento database configuration file is an important step when you install or change hosting (server) for a website. In case you need to reset your Magento data configurations find the exact file and then find its right location for change in the new server credentials.

At first, determine local.xml file in  /app/etc/ and locate it
<config>
<global>
<install>
<date><![CDATA[Tue, 10 Apr 2016 13:42:46 +0000]]></date>
</install>	
<crypt>
<key><![CDATA[a00aff7cc34ebd322e158ab98ecd14f1]]></key>
</crypt>
<disable_local_modules>false</disable_local_modules>
<resources>
<db>
<table_prefix><![CDATA[]]></table_prefix>
</db>
<default_setup>
<connection>
<host><![CDATA[localhost]]></host>
<username><![CDATA[Usermame]]></username>
<password><![CDATA[Password]]></password>
<dbname><![CDATA[databasename]]></dbname>
<initStatements><![CDATA[SET NAMES utf8]]></initStatements>
<model><![CDATA[mysql4]]></model>
<type><![CDATA[pdo_mysql]]></type>
<pdoType><![CDATA[]]></pdoType>
<active>1</active>
</connection>
</default_setup>
</resources>
<session_save><![CDATA[files]]></session_save>
</global>
<admin>
<routers>
<adminhtml>
<args>
<frontName><![CDATA[admin]]></frontName>
</args>
</adminhtml>
</routers>
</admin>
</config>

Now, you can easily edit all subjects you need to configure to things running

  • 1-Host
  • 2-Username
  • 3-Password
  • 4-DBname

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *