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
<connection>
<host><![CDATA[hostname]]></host>
<username><![CDATA[DB username]]></username>
<password><![CDATA[DB pwd]]></password>
<dbname><![CDATA[DB name]]></dbname>
<active>1</active>
</connection>
If you need any kind of help you can contact us as we are one of best Magento extensions developer.
If you want to change database name of Magento that is easy. First create a new database and transfer data from old database to new database.
Now change the name from Magento configuration. For that you have to make changes in local.xml available at ‘magento/app/etc/local.xml’ and change here.