当前位置:网站首页>MySQL read-write separation mysql-proxy deployment
MySQL read-write separation mysql-proxy deployment
2022-08-02 05:24:00 【hzsnone】
0x01 Introduction
mysql-proxy is the mysql middleware service officially provided by mysql. Several mysql-clients can be connected to the upstream, and several mysql-servers can be connected to the back-end.
It uses the mysql protocol, and any upstream using mysql-client can migrate to mysql-proxy without modifying any code.
The most basic usage of mysql-proxy is as an intermediate layer for request interception and request transfer:
mysql-proxy allows users to specify Lua scripts to intercept requests, analyze and modify requests, and it also allows users toSpecifies the result returned by the Lua script to the server.
0x02 Purpose
sql interception and modification
performance analysis and monitoring
read-write separation
request routing
0x03 Deployment Process
Binary package installation
wget https://downloads.mysql.com/archives/get/file/mysql-proxy-0.8.5-linux-el6-x86-64bit.tar.gz
tar zxf mysql-proxy-0.8.5-linux-el6-x86-64bit.tar.gz
mv mysql-proxy-0.8.5-linux-el6-x86-64bit /usr/local/mysql-proxy
cd /usr/local/mysql-proxy
mkdir log
mkdir conf
#Configuration file creation
cd conf
vim mysql-proxy.conf
[mysql-proxy]###If it is an ordinary user, this option is removeduser=rootdaemon=truekeepalive=trueplugins=proxy,admin###Log levellog-level=infolog-file=/usr/local/mysql-proxy/log/mysql-proxy.log###Local ip addressproxy-address=0.0.0.0:9196##backend master note addressesproxy-backend-addresses=192.168.1.11:3306##admin-address=104.137.27.4:9197proxy-read-only-backend-addresses=192.168.1.21:3306IP and port of #proxy management user admin###The following three parameters must be set, otherwise the mysql-proxy service cannot be startedadmin-username=mysql_proxy_useradmin-password=456123###admin's lua script address;admin-lua-script=/usr/local/mysql-proxy/lib/mysql-proxy/lua/admin.lua0X04 start
/usr/local/mysql-proxy/bin/mysql-proxy --defaults-file=/usr/local/mysql-proxy/conf/mysql-proxy.conf边栏推荐
猜你喜欢
随机推荐
单目3D目标检测之入门
js平层数组转树形结构(解决数据处理后源数据篡改)
金融行业案例 | 未来智安XDR助力银行业客户优化安全运营体系,有效提高告警研判率
携手推进国产化发展,未来智安与麒麟软件完成兼容互认证
详解CAN总线:什么是CAN总线?
科研笔记(七) 基于路径规划和WiFi指纹定位的多目的地室内导航
The CCF brush topic tour - the first topic
吴恩达机器学习系列课程笔记——第八章:神经网络:表述(Neural Networks: Representation)
MapFi论文架构整理
ScholarOne Manuscripts提交期刊LaTeX文件,无法成功转换PDF!
腾讯云+keepalived搭建云服务器主备实践
树莓派4B设置双网卡静态IP、网卡优先级、查看系统多少位
Andrew Ng's Machine Learning Series Course Notes - Chapter 18: Application Example: Image Text Recognition (Application Example: Photo OCR)
两端是圆角的进度条微信对接笔记
PHP5.6安装ssh2扩展用与执行远程命令
三维目标检测之ROS可视化
el-dropdown(下拉菜单)的入门学习
Kubernetes中Pod对象学习笔记
PHP实现阿里云HMAC-SHA1签名方法封装
吴恩达机器学习系列课程笔记——第九章:神经网络的学习(Neural Networks: Learning)









