当前位置:网站首页>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.lua
0X04 start
/usr/local/mysql-proxy/bin/mysql-proxy --defaults-file=/usr/local/mysql-proxy/conf/mysql-proxy.conf
边栏推荐
- Research Notes (8) Deep Learning and Its Application in WiFi Human Perception (Part 1)
- flasgger手写phpwind接口文档
- The CCF brush topic tour - the first topic
- 位居榜首 | 未来智安荣登CCIA「2022年中国网安产业潜力之星」榜单
- 树莓派4B开机自动挂载移动硬盘,以及遇到the root account is locked问题
- 七分钟深入理解——卷积神经网络(CNN)
- 5个开源组件管理小技巧
- jetracer_pro_2GB AI Kit系统安装使用说明
- el-select和el-tree结合使用-树形结构多选框
- windows系统下php-ffmpeg类库的使用
猜你喜欢
ffmpeg视频播放、格式转化、缩放等命令
科研笔记(八) 深度学习及其在 WiFi 人体感知中的应用(下)
七分钟深入理解——卷积神经网络(CNN)
SCI writing strategy - with common English writing sentence patterns
Liunx服务环境部署
吴恩达机器学习系列课程笔记——第十八章:应用实例:图片文字识别(Application Example: Photo OCR)
matlab作图显示中文正常,保存图片中文乱码
【学习笔记】如何打造运维组织架构
吴恩达机器学习系列课程笔记——第六章:逻辑回归(Logistic Regression)
企业需要知道的5个 IAM 最佳实践
随机推荐
2022华为软件精英挑战赛(初赛)-总结
空卡安装设置树莓派4B并安装opencv+QT
想低成本保障软件安全?5大安全任务值得考虑
迭代器与生成器
3D object detection dataset
吴恩达机器学习系列课程笔记——第十五章:异常检测(Anomaly Detection)
el-input 只能输入整数(包括正数、负数、0)或者只能输入整数(包括正数、负数、0)和小数
Liunx服务环境部署
GO Module的依赖管理(二)
QObject: Cannot create children for a parent that is in a different thread.
普氏分析法-MATLAB工具箱函数
运行时应用自我保护(RASP):应用安全的自我修养
详解CAN总线:什么是CAN总线?
心余力绌:企业面临的软件供应链安全困境
两端是圆角的进度条微信对接笔记
网络 7 层架构
Jetson Nano 2GB Developer Kit 安装说明
[Study Notes] How to Create an Operation and Maintenance Organizational Structure
树莓派上FFMPEG/VLC播放海康网络摄像仪视频
Deep Blue Academy-Visual SLAM Lecture 14-Chapter 6 Homework