mysql-proxy负载均衡

1、下载mysql-proxy包

2、解压并启动

tar zxvf mysql-proxy....tar
mv mysql-proxy... /user/local/proxy
cd /usr/local/proxy
#IP1为master的ip,IP2为slave1的ip,IP3为slave2的ip
./bin/mysql-proxy -P IP:4040 -b IP1:port -r IP2:port -r IP3:port -s /usr/local/mysql-proxy/share/doc/mysql-proxy/rw-spliting.lua --daemon

3、连接

mysql -hIP  -uroot -P4040
上一篇:8.css边框


下一篇:HTTPClient实现java自动登录人人网