Use Mycat need to install jdk1.7 above first
Reference: http://www.cnblogs.com/llhhll/p/9257764.html
1 Download the extracted directory from the official website as follows (1.6 version)
: Https://github.com/MyCATApache/Mycat-download
2 primary configuration files under the Conf folder
The main use of two server.xml and Schema.xml
Now we use MYCAT for MySQL database cluster read and write separation, data synchronization using MySQL's own binary files for master-slave synchronization
Mycat 192.168.0.1
Main Library 192.168.0.2 (write)
Reads the main library binaries from the library 192.168.0.3 (read) data synchronously (ref.: http://www.cnblogs.com/llhhll/p/9182679.html)
The Server.xml configuration is as follows:
Configure the user node to
The Schema.xml configuration is as follows:
Schema node
Datanode node
The Datahost node is as follows
Here the main library (write) is 192.168.0.2
Here from the library (read) for 192.168.0.3
Configure after normal startup bin file
Start Startup_nowrap
Test:
1 using navicat Direct Connect library mycat default port is 8066
2 authentication with Code direct connection
Connectionstring= "server=127.0.0.1;database=testliang;uid=root;pwd=123456; Pooling=true; Connection Lifetime = 120; Connection Timeout = 120; port=8066 ";
The database=testliang;uid=root;pwd=123456 here; Consistent with Mycat under Server.xml user node
Install Mycat under Windows, and simply use