mycat的schema
Posted 迷茫于红尘
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了mycat的schema相关的知识,希望对你有一定的参考价值。
<?xml version="1.0"?>
<!DOCTYPE mycat:schema SYSTEM "schema.dtd">
<mycat:schema xmlns:mycat="http://io.mycat/">
<schema name="hm_system" checkSQLschema="true" sqlMaxLimit="100">
<table name="jhi_persistent_audit_event" dataNode="hm_system" />
<table name="jhi_persistent_audit_evt_data" dataNode="hm_system" />
<table name="databasechangelog" dataNode="hm_system" />
<table name="databasechangeloglock" dataNode="hm_system" />
<table name="tb_sys_menu" dataNode="hm_system" />
<table name="tb_sys_button" dataNode="hm_system" />
<table name="tb_sys_version_r_mb" dataNode="hm_system" />
<table name="tb_sys_role_r_mb" dataNode="hm_system" />
<table name="tb_dic_menu_type" dataNode="hm_system" />
<table name="tb_dic_button_type" dataNode="hm_system" />
<table name="tb_dic_mb_type" dataNode="hm_system" />
<table name="tb_sys_system" dataNode="hm_system" type="global" dataNode="hm_user,hm_system"/>
<table name="tb_sys_version" dataNode="hm_system" type="global" dataNode="hm_user,hm_system"/>
<table name="tb_sys_role" dataNode="hm_system" type="global" dataNode="hm_user,hm_system"/>
<table name="tb_dic_sys_type" dataNode="hm_system" type="global" dataNode="hm_user,hm_system"/>
</schema>
<schema name="hm_user" checkSQLschema="true" sqlMaxLimit="100">
<table name="jhi_persistent_audit_event" dataNode="hm_user" />
<table name="jhi_persistent_audit_evt_data" dataNode="hm_user" />
<table name="databasechangelog" dataNode="hm_user" />
<table name="databasechangeloglock" dataNode="hm_user" />
<table name="tb_organization" dataNode="hm_user" />
<table name="tb_org_r_version" dataNode="hm_user" />
<table name="tb_group" dataNode="hm_user" />
<table name="tb_user" dataNode="hm_user" />
<table name="tb_group_r_role" dataNode="hm_user" />
<table name="tb_dic_org_type" dataNode="hm_user" />
<table name="tb_dic_login_type" dataNode="hm_user" />
<table name="tb_dic_online" dataNode="hm_user" />
<table name="tb_sys_version" dataNode="hm_system" type="global" dataNode="hm_user,hm_system"/>
<table name="tb_sys_role" dataNode="hm_system" type="global" dataNode="hm_user,hm_system"/>
<table name="tb_sys_system" dataNode="hm_system" type="global" dataNode="hm_user,hm_system"/>
<table name="tb_dic_sys_type" dataNode="hm_system" type="global" dataNode="hm_user,hm_system"/>
</schema>
<schema name="hm_sms" checkSQLschema="true" sqlMaxLimit="100">
<table name="jhi_persistent_audit_event" dataNode="hm_sms" />
<table name="jhi_persistent_audit_evt_data" dataNode="hm_sms" />
<table name="databasechangelog" dataNode="hm_sms" />
<table name="databasechangeloglock" dataNode="hm_sms" />
<table name="tb_sys_parameter" dataNode="hm_sms" />
</schema>
<schema name="sims_passenger" checkSQLschema="false" sqlMaxLimit="100">
<table name="TB_DIC_COUNT_LEVEL" dataNode="sims_passenger" />
<table name="tb_dic_manage" dataNode="sims_passenger" />
</schema>
<dataNode name="hm_system" dataHost="mysql1" database="hm_system" />
<dataNode name="hm_user" dataHost="mysql1" database="hm_user" />
<dataNode name="sims_passenger" dataHost="oracle1" database="sims_passenger_flow" />
<dataNode name="hm_sms" dataHost="mysql1" database="hm_sms" />
<dataHost name="mysql1" maxCon="1000" minCon="10" balance="1" writeType="0" dbType="mysql" dbDriver="native" switchType="1" slaveThreshold="100">
<heartbeat>select user()</heartbeat>
<writeHost host="hostM1" url="IP地址:3306" user="root" password="handsmap123">
<readHost host="hostS1" url="IP地址:3306" user="root" password="handsmap123"/>
<readHost host="hostS2" url="IP地址:3306" user="root" password="handsmap123"/>
</writeHost>
</dataHost>
<dataHost name="oracle1" maxCon="1000" minCon="1" balance="0" writeType="0" dbType="oracle" dbDriver="jdbc"> <heartbeat>select 1 from dual</heartbeat>
<connectionInitSql>alter session set nls_date_format=‘yyyy-mm-dd hh24:mi:ss‘</connectionInitSql>
<writeHost host="hostM2" url="jdbc:oracle:thin:@IP地址:1521:testhmORCL" user="sims_passenger_flow" password="sims_passenger_flow" > </writeHost> </dataHost>
</mycat:schema>
以上是关于mycat的schema的主要内容,如果未能解决你的问题,请参考以下文章
MyCat学习第一天之MyCat简介,配置文件详解,分片操作,分片规则