First thing you need to do is create a connection in your module's config.xml. It should look similar to the
default_setup
in your /app/etc/local.xml
. Here you can specify the host to be localhost and then set a different dbname or you can specify a different host completely. I have also used a socket before which works also.<resources>
<new_db>
<connection>
<host><![CDATA[localhost]]></host>
<username><![CDATA[db_username]]></username>
<password><![CDATA[db_password]]></password>
<dbname><![CDATA[db_name]]></dbname>
<model>mysql4</model>
<type>pdo_mysql</type>
<active>1</active>
</connection>
</new_db>
</resources>
EmoticonEmoticon