How to Edit Magento Database Configuration File

Magento is a most popular eCommerce software application. In this article you will show you how to get details about Magento configuration file.

To change your Magento database web server hostname, database login name, password , you need to modify below computer file.

Magento Install Dir/app/etc/local.xml

Go to your Magento installation directory and edit local.xml configuration file in your favorite editor and look for following settings:

<connection>
   <host><![CDATA[localhost]]></host>
   <username><![CDATA[database_username]]></username>
   <password><![CDATA[database_password]]></password>
   <dbname><![CDATA[database_name]]></dbname>
   <active>1</active>
</connection>

Now you can update the following values as per your host.

  • localhost : Mysql server hostname.
  • database_username : Mysql user to connect database server.
  • database_password : Mysql user password .
  • database_name : Mysql database name of magento.

That’s all we have to do to edit Magento configureation file.  Please give your opinion below if you experience any issues or to discuss your ideas and experiences.