I can't find any examples online of how to configure two separate databases for Magento - one for read requests and one for write requests. I assume that this should happen in app/etc/local.xml but I don't know what the syntax is. Does anybody know the syntax or have a link to a blog post or something that my searching didn't turn up?
I'm running Magento 1.6.1.0
Thanks
The Magento 2 split database feature incorporates such sections of the platform as orders, checkout, and product data. Each one can possess its own master database which supports replication, so you can easily scale load from Magento 2 checkouts, browsing, or order management and merchandising activities.
The FrontController class class searches through a list of routers, provided by the RouterList class, until it matches one that can process a request. When the FrontController finds a matching router, it dispatches the request to an action class returned by the router.
Magento uses the MySQL database management system with an Entity-Attribute-Value (EAV) model that allows space-efficient data encoding. As of version 2.4, Magento supports MySQL 8, which is up to twice as fast as the previously supported version 5.7.
In your app/etc/local.xml
fill <resources>
in next way:
<resources>
<db>
<table_prefix><![CDATA[]]></table_prefix>
</db>
<core_read>
<connection>
<use />
<host><![CDATA[localhost]]></host>
<username><![CDATA[root]]></username>
<password><![CDATA[]]></password>
<dbname><![CDATA[db_read_name]]></dbname>
<initStatements><![CDATA[SET NAMES utf8]]></initStatements>
<model><![CDATA[mysql4]]></model>
<type><![CDATA[pdo_mysql]]></type>
<pdoType><![CDATA[]]></pdoType>
<active>1</active>
</connection>
</core_read>
<core_write>
<connection>
<use />
<host><![CDATA[localhost]]></host>
<username><![CDATA[root]]></username>
<password><![CDATA[]]></password>
<dbname><![CDATA[db_write_name]]></dbname>
<initStatements><![CDATA[SET NAMES utf8]]></initStatements>
<model><![CDATA[mysql4]]></model>
<type><![CDATA[pdo_mysql]]></type>
<pdoType><![CDATA[]]></pdoType>
<active>1</active>
</connection>
</core_write>
</resources>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With