标签:
官网下载地址:http://dev.mysql.com/downloads/mysql-proxy
学习版本:mysql-proxy-0.8.5-1.el6.x86_64
[mysql-proxy]
daemon = true
pid-file = /var/run/mysql-proxy.pid
log-file = /var/log/mysql-proxy.log
log-level = debug #调试级别
max-open-files = 1024
plugins = admin,proxy
user = mysql-proxy
#
#Proxy Configuration
proxy-address = 0.0.0.0:3306 #代理服务监听的地址和端口
proxy-backend-addresses = 172.16.2.11:3306 #支持读写操作的后端mysql
proxy-read-only-backend-addresses = 172.16.2.12:3306 # 只读后端
#proxy-lua-script =
proxy-lua-script = /usr/lib64/mysql-proxy/lua/rw-splitting.lua #读写分离脚本
#proxy-skip-profiling = true
#
# Admin Configuration
admin-address = 0.0.0.0:4041 #msyql-prxoy连入的管理端口
admin-lua-script = /usr/lib64/mysql-proxy/lua/admin.lua #msyql-prxoy连入的管理脚本位置
admin-username = admin #msyql-prxoy连入的管理帐号
admin-password = admin #msyql-prxoy连入的管理密码
标签:
原文地址:http://www.cnblogs.com/kwstars/p/35a70b4d43664b115fe591df0c069f31.html