Thursday, March 29, 2012

Magento Tips: MySQL database connection setting for Magento store


If you want to change the MySQL database connection details such as hostname, database name, username etc of a Magento Store, you need to edit the following file for that. If its in a web server, connect using a FTP software and download the file, edit it and upload back.
/app/etc/local.xml

After opening the file in a text editor, you need to search for the code block which is given below.


<connection>
<host><![CDATA[hostname]]></host>
<username><![CDATA[DB username]]></username>
<password><![CDATA[DB pwd]]></password>
<dbname><![CDATA[DB name]]></dbname>
<active>1</active>
</connection>



Do it carefully without changing the structure of the code. Make sure you only change the values that are inside the CDATA brackets. Upload back the file after editing.
Please keep in mind that removing or renaming the file will trigger the reinstall procedure of the Magento Store.

No comments:

Post a Comment