mycat主从读写分离范例
1 .mycat二进制包安装 前提:先安装jdk。 tar -zxvf Mycat-server-1.6.5-release-20180122220033- linux.tar.gz cd mycat mv mycat /opt/ useradd mycat chown - R mycat:mycat mycat 2 .mysql操作 搭建主库环境 省略...... 角色 主机IP server_id Master 192.168.119.130:3306 62 Slave 192.168.119.130:3307 63 3 .修改配置文件 [root@testdb1 conf] # cat schema.xml <?xml version= " 1.0 " ?> <!DOCTYPE mycat:schema SYSTEM " schema.dtd " > <mycat:schema xmlns:mycat= " http://io.mycat/ " > <schema name= " scott " checkSQLschema= " false " sqlMaxLimit= " 100 " dataNode= " dnscott " /> <schema name= " testdb " checkSQLschema= " false " sqlMaxLimit= " 100