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
open this file and edit this protion of xml file
and you just need to change the values that are enclosed in [CDATA] tag