Magento is a great E-Commerceshopping solution and this great E-Commerce cms has some premade templates that comes with magento installation and database that you may need to change the database name to what you’ve already c reated as cpanel will ad username prefix to it so you have to change the name of the database of such pre-installed magento or even you may need to change the database name in any condition.

changing magento database is easy and you just need to edit an xml file named local.xml
It is really a question for me and so many people who have been in such situation that why the name isn’t config.xml instead and this may have a good reason for the developer
this file is located at

app/etc/local.xml

open this file and edit this protion of xml file

<default_setup>
                <connection>
                    <host><![CDATA[localhost]]></host>
                    <username><![CDATA[username]]></username>
                    <password><![CDATA[password]]></password>
                    <dbname><![CDATA[dbname]]></dbname>
                    <active>1</active>
                </connection>
            </default_setup>

and you just need to change the values that are enclosed in [CDATA[]] tag

THanks
Voshka Niknam

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.