Skip to content

How to Edit Magento Database Configuration File

Advertisement

Magento is a most popular eCommerce software program. In this article you will get details about Magento database configuration file. To change your Magento database server hostname, database username, password or database name, you need to edit below file.

/<Magento Install Dir>/app/etc/local.xml

Navigate to your Magento installation directory and edit local.xml configuration file in your favorite editor and search 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 update the orange highlighted values as following

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

Rahul

I, Rahul Kumar am the founder and chief editor of TecAdmin.net. I am a Red Hat Certified Engineer (RHCE) and working as an IT professional since 2009..

Leave a Reply

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


Back to top