1

I have setted up a MySql master-slave replication in magento enterprise 1.14.2.4. The master-slave replication works fine e.g if I create a new database in Master db, same database automatically gets created into the Slave db. The issue I am facing is that whenever I save any system configuration I am getting a slave replication error and the values doesn't get saved.

The replication error clearly tells me that you are using a READ database connection in order to perform a WRITE (update or insert) query in the slave database. Below is my local.xml's database connection settings for this magento db replication setup.

<default_setup>
            <connection>
                <use />
                <host><![CDATA[server-1]]></host>
                <username><![CDATA[dev]]></username>
                <password><![CDATA[5YCSDQGU56DEW5GRNrOfMA]]></password>
                <dbname><![CDATA[dev.test]]></dbname>
                <initStatements><![CDATA[SET NAMES utf8]]></initStatements>
                <model><![CDATA[mysql4]]></model>
                <type><![CDATA[pdo_mysql]]></type>
                <pdoType><![CDATA[]]></pdoType>
                <active>1</active>
            </connection>
        </default_setup>
        <default_read>
            <connection>
                <use />
                <host><![CDATA[/var/lib/mysql/mysql.sock]]></host>
                <username><![CDATA[dev]]></username>
                <password><![CDATA[5YCSDQGU56DEW5GRNrOfMA]]></password>
                <dbname><![CDATA[dev.test]]></dbname>
                <initStatements><![CDATA[SET NAMES utf8]]></initStatements>
                <model><![CDATA[mysql4]]></model>
                <type><![CDATA[pdo_mysql]]></type>
                <pdoType><![CDATA[]]></pdoType>
                <active>1</active>
            </connection>
        </default_read>

Any help or guidance would be much appreciated!

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.