1、下载mysql-proxy-0.8.3-win32-x86.zip:
地址: http://mysql.cdpa.nsysu.edu.tw/Downloads/MySQL-Proxy/
2、解压:mysql-proxy-0.8.3-win32-x86.zip
放到D:\(注意:目录随意,路径中不要带有空格)
3、添加环境变量:
path:D:\mysql-proxy\bin
4、测试:
C:\Documents and Settings\Administrator>mysql-proxy
2013-11-29 16:57:56: (critical) plugin proxy 0.8.3 started
5、配置启动:
mysql-proxy --proxy-read-only-backend-addresses=192.168.1.125:3307 --proxy-backendaddresses=192.168.1.125:3306 --proxy-lua-script=D:/mysql-roxy/share/doc/mysql-proxy/rw-splitting.lua