mycat 相关配置

2017-03-22  本文已影响0人  猪肉楠

读写分离

<?xml version="1.0"?>
<!DOCTYPE mycat:schema SYSTEM "schema.dtd">
<mycat:schema xmlns:mycat="http://io.mycat/">
        <schema name="TESTDB" checkSQLschema="false" sqlMaxLimit="100" dataNode="dn1">
        </schema>
        <schema name="TMPDB" checkSQLschema="false" sqlMaxLimit="100" dataNode="dn2">
        </schema>
        <dataNode name="dn1" dataHost="node1" database="test" />
        <dataNode name="dn2" dataHost="node1" database="tmp" />
        <dataHost name="node1" maxCon="1000" minCon="10" balance="2" writeType="0" dbType="mysql" dbDriver="native" switchType="1">
                <heartbeat>select user()</heartbeat>
                <writeHost host="master1" url="172.16.40.58:3306" user="root" password="mysql*()">
                        <readHost host="slave1" url="172.16.20.11:3306" user="root" password="mysql*()" />
                </writeHost>
        </dataHost>
</mycat:schema>
上一篇 下一篇

猜你喜欢

热点阅读