Mysql mycat读写分离
Mysql mycat读写分离: 下载网址: http://dl.mycat.io Mycat官方网址: http://mycat.org.cn 说明: 10.0.1.2为mycat服务器,10.0.1.3、10.0.1.4为mysql服务器 yum install java-1.8.0-openjdk tar zxfv Mycat-server-1.6.7.5-test-20200109231555-linux.tar.gz -C /space/ 配置读写分离: vi /space/mycat/conf/schema.xml <?xml version="1.0"?> <!DOCTYPE mycat:schema SYSTEM "schema.dtd"> <mycat:schema xmlns:mycat=" http://io.mycat/"> ; <schema name="TESTDB" checkSQLschema="true" sqlMaxLimit="100" randomDataNode="dn1"> <table name="travelrecord,address" dataNode="dn1" rule="auto-sharding-long" splitTableNames ="true"/> </schema> <dataNode name="dn1"