How to Connect a New Magento Installation to Old Database


We’ve been getting lots of calls on how to get new Magento installations installed in subfolders to work with existing databases. Lots of folks want to test fresh installations of Magento on their servers, so here’s how to connect your new installation to your old database.

FTP your new Magento installation to the subfolder. Now open the /public_html/app/etc/local.xml file and file the following xml data:

<default_setup>
<connection>
<host><![CDATA[localhost]]></host>
<username><![CDATA[Enter your database username here]]></username>
<password><![CDATA[Enter your database password here]]></password>
<dbname><![CDATA[Enter the name of your database here]]></dbname>
<active>1</active>
</connection>
</default_setup>

Now just enter the database access credentials–username, password, and dbname–into the xml file as noted above. There are no quotation marks, but your credentials should be entered between the brackets. Yes, the brackets stay.

And that should have you up and running with your old database. Call us if you have any questions or need us to help you with more involved migration issues.

This also comes in handy if you want to give developers access to your database but don’t want to expose your favorite password. Just create a new database user and associate it with your database. Then replace the credentials in your local.xml file with the new user’s credentials. When development is done, switch back and remove that user from your database.

integrate magento with erp

You may also like:
Magento Commerce is now an Independent Company
Creating Custom Module in Magento
When and Why should you upgrade to Magento 2.x?

Search

Search
On Key

Related Posts

APPSeCONNECT is now a completely new entity headquartered in the US! 🇺🇸