一、环境配置
1.1 数据库配置
项目 | Mycat | Mycat-master | Mycat-master-standby | Mycat-slave |
ip | 10.2.14.196 | 47.92.159.234 | 59.40.181.247 | 118.31.21.138 |
port | 8066/9066 | 3306 | 3306 | 3306 |
2.2 创建表
CREATE table travelrecord ( id int(11) not null AUTO_INCREMENT, org_code varchar(20) not NULL, test_name varchar(20) DEFAULT null, PRIMARY KEY(id) ) ENGINE=INNODB DEFAULT CHARSET=utf8;
2.3 schema 配置
1.当balance=0 时,不开启读写分离,所有读操作都发生在当前的writeHost上
<schema