How to edit Magento database configuration file

How to edit Magento database configuration file

In this post we will show you How to edit Magento database configuration file, hear for How to edit Magento database configuration file we will give you demo and example for implement.

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, please pay attention to the guideline below.

At first, determine local.xml file in /app/etc/

You will see a content of this file like this appearing after some second:

<config>
	<global>
		<install>
			<date><![CDATA[Tue, 06 Apr 2017 17:50:55 +0000]]></date>
		</install>	
		<crypt>
			<key><![CDATA[f85drjhefa98g51df22fc865085dc24]]></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[ThisisMyUserName]]></username>
					<password><![CDATA[ThisisMyPassword]]></password>
					<dbname><![CDATA[ThisisMydatabaseName]]></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>

Then, you can easily edit all subjects you need about:

  • Host
  • Username
  • Password
  • DBname

After finishing all the changing, you may suit forward to values to the new data information.

Hope this code and post will helped you for implement How to edit Magento database configuration file. if you need any help or any feedback give it in comment section or you have good idea about this post you can give it comment section. Your comment will help us for help you more and improve onlincode. we will give you this type of more interesting post in featured also so, For more interesting post and code Keep reading our blogs onlincode.org

Leave a Comment

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

  +  62  =  71

We're accepting well-written guest posts and this is a great opportunity to collaborate : Contact US