<!-- <property name="bucketMapPath">/etc/mycat/bucketMapPath</property>
  用于测试时观察各物理节点与虚拟节点的分布情况,如果指定了这个属性,会把虚拟节点的murmur hash值与物理节点的映射按行输出到这个文件,没有默认值,如果不指定,不会输出任何东西 -->
  </function>
  <function name="hash-int"
  class="org.opencloudb.route.function.PartitionByFileMap">
  <property name="mapFile">partition-hash-int.txt</property>
  </function>
  <function name="rang-long"
  class="org.opencloudb.route.function.AutoPartitionByLong">
  <property name="mapFile">autopartition-long.txt</property>
  </function>
  <function name="mod-long" class="org.opencloudb.route.function.PartitionByMod">
  <!-- how many data nodes -->
  <property name="count">3</property>
  </function>
  <function name="func1" class="org.opencloudb.route.function.PartitionByLong">
  <property name="partitionCount">8</property>
  <property name="partitionLength">128</property>
  </function>
  <function name="latestMonth"
  class="org.opencloudb.route.function.LatestMonthPartion">
  <property name="splitOneDay">24</property>
  </function>
  <function name="partbymonth"
  class="org.opencloudb.route.function.PartitionByMonth">
  <property name="dateFormat">yyyy-MM-dd</property>
  <property name="sBeginDate">2015-01-01</property>
  </function>
  <function name="rang-mod" class="org.opencloudb.route.function.PartitionByRangeMod">
  <property name="mapFile">partition-range-mod.txt</property>
  </function>
  <function name="jump-consistent-hash" class="org.opencloudb.route.function.PartitionByJumpConsistentHash">
  <property name="totalBuckets">3</property>
  </function>
  </mycat:rule>
  Mycat连接mysql示例
  cmd命令运行:

  结果:

  Mycat连接mysql结果

  上图上面的mycatdb1,mycatdb2,mycatdb3数据库是真实物理数据库,TESTDB是中间件逻辑数据库,此时已经所有工作都准备好。
  以上是Windows环境Mycat数据库分库分表中间件部署的全文介绍,希望对您学习和使用数据库有所帮助.