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>