码迷,mamicode.com
首页 > 其他好文 > 详细

mycat使用--schema配置

时间:2015-11-30 12:52:49      阅读:477      评论:0      收藏:0      [点我收藏+]

标签:

<?xml version="1.0"?>

<!DOCTYPE schema SYSTEM "schema.dtd">

-<mycat:schema xmlns:mycat="http://org.opencloudb/">


-<schema sqlMaxLimit="100" checkSQLschema="false" name="TESTDB">

<!--设备相关表-->

<table name="tb_device_basic" rule="dguid" dataNode="dnd1" primaryKey="id"/>

<table name="tb_user_device" rule="userid" dataNode="dnd1" primaryKey="id"/>

<table name="tb_device_alarm" rule="dguid" dataNode="dnd1" primaryKey="id"/>

<table name="tb_device_user" rule="dguid" dataNode="dnd1" primaryKey="id"/>

<table name="tb_app_version" rule="dguid" dataNode="dnd1" primaryKey="id"/>

<table name="tb_advertisement_version" rule="dguid" dataNode="dnd1" primaryKey="id"/>

<table name="tb_weburl" rule="dguid" dataNode="dnd1" primaryKey="id"/>

<table name="tb_device_version" rule="dguid" dataNode="dnd1" primaryKey="id"/>

<table name="mycat_sequence" dataNode="dnd1" primaryKey="name"/>

<table name="statistics" rule="keyname" dataNode="dnd1" primaryKey="id"/>

<table name="sysuser" rule="id" dataNode="dnd1" primaryKey="id"/>

<!-- 账号相关表-->


<table name="tb_user" rule="userid" dataNode="dna1" primaryKey="id"/>

<!-- 用户权限管理相关表 -->


<table name="sysrole" rule="rule1" dataNode="dnd1" primaryKey="id"/>

<table name="sysfunction" rule="rule1" dataNode="dnd1" primaryKey="id"/>

<table name="sysrole_function" rule="rule1" dataNode="dnd1" primaryKey="id"/>

<table name="sysuser_role" rule="rule1" dataNode="dnd1" primaryKey="id"/>

</schema>

<!-- <dataNode name="dn1$0-743" dataHost="localhost1" database="db$0-743" /> -->


<dataNode name="dnd1" database="DeviceDB" dataHost="deviceservice1"/>

<dataNode name="dna1" database="Account_XiaoWei" dataHost="accountservice1"/>


-<dataHost name="deviceservice1" slaveThreshold="100" switchType="1" dbDriver="jdbc" dbType="mysql" writeType="0" balance="0" minCon="10" maxCon="1000">

<heartbeat>select user()</heartbeat>

-<writeHost password="***" user="***" url="jdbc:mysql://***:3306" host="hostM1">

<!-- can have multi read hosts -->


</writeHost>


</dataHost>


-<dataHost name="accountservice1" slaveThreshold="100" switchType="1" dbDriver="jdbc" dbType="mysql" writeType="0" balance="0" minCon="10" maxCon="1000">

<heartbeat>select user()</heartbeat>

<!-- can have multi write hosts -->


<writeHost password="***" user="***" url="jdbc:mysql://***:3306" host="hostM2">    </writeHost>

</dataHost>

</mycat:schema>

 

mycat使用--schema配置

标签:

原文地址:http://www.cnblogs.com/fengyefeiluo/p/5006766.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!