当前位置:网站首页>MySQL proxy middleware atlas installation and configuration
MySQL proxy middleware atlas installation and configuration
2022-06-30 15:49:00 【Bug trendsetter】
The premise is to configure master-slave reference :http://www.cnblogs.com/super-d2/p/4802990.html
First , Go ahead and download Altas Of rpm package , Download address :https://github.com/Qihoo360/Atlas/releases
To see the version clearly ,centos 5.x:Atlas-1.0.3.el5.x86_64.rpm centos 6.x:
My system is centos 6.4 , So download Atlas-1.0.3.el6.x86_64.rpm
Don't get it wrong , Otherwise, an error will occur in the final startup . You can also adopt source code compilation and installation , however rpm Installation is time-saving and labor-saving , And it's simple .
download rpm
wget https://github.com/Qihoo360/Atlas/releases/download/1.0.3/Atlas-1.0.3.el6.x86_64.rpm
install
rpm -i Atlas-1.0.3.el6.x86_64.rpm
The installation directory is /usr/local/mysql-proxy
conf There is a configuration file under the folder test.cnf, We can modify it directly , Here is what I modified
Master database server :192.168.83.11
From the database server :192.168.83.12
proxy The server :192.168.83.13
[mysql-proxy]
#Atlas Name of the loaded module , There is no need to change
plugins = admin, proxy
# User name of the management interface
admin-username = root
# Password for management interface
admin-password = 123456
# Implementation of management interface Lua Script path
admin-lua-script = /usr/local/mysql-proxy/lib/mysql-proxy/lua/admin.lua
#Atlas Back end connected MySQL The main library IP And port , Multiple items can be set , Separate with commas
proxy-backend-addresses = 192.168.83.11:3306
#Atlas Back end connected MySQL From library IP And port ,@ The numbers that follow represent weights , Used for load balancing , If omitted, it defaults to 1, Multiple items can be set , Separate with commas
proxy-read-only-backend-addresses = 192.168.83.12:[email protected]
# Set up Atlas Mode of operation , Set to true Time is the way of daemons , Set to false It's the front desk way , Generally, it is set as false, The online runtime is set to true
daemon = false# Set up Atlas Mode of operation , Set to true when Atlas Will start two processes , One for monitor, One for worker,monitor stay worker It will restart automatically after an unexpected exit , Set to false It's just worker, No, monitor, Generally, it is set as false, The online runtime is set to true
keepalive = false
# Number of worker threads , Recommended settings and system CPU Auditing is equal event-threads = 4
# The level of logging , It is divided into message、warning、critical、error、debug The five level
log-level = message
# Log storage path
log-path = /usr/local/mysql-proxy/log
# Instance name , For more than one... On the same machine Atlas The distinction between examples
instance = test
#Atlas Working interface for monitoring IP And port
proxy-address = 0.0.0.0:1234
#Atlas Monitoring management interface IP And port
admin-address = 0.0.0.0:2345# The minimum number of free connections in the connection pool , It should be set to event-threads Integer multiple , It can be appropriately increased or decreased according to the size of business requests
min-idle-connections = 8
# Sub table settings , In this case person For the name of the library ,mt Is the name of the watch ,id For the sub table fields ,3 Is the number of sub tables , Multiple items can be set , Separated by commas , If you do not divide the table, you do not need to set this item
#tables = person.mt.id.3
# The user name and its corresponding encrypted MySQL password , Password usage PREFIX/bin The encryption program in the directory encrypt encryption , This setting item is used for multiple user names to access the same Atlas Examples , If there is only one user name > You do not need to set this item
#pwds = user1:+jKsgB3YAG8=, user2:GS+tr4TPgqc=
# Default character set , If it is not set , The default character set is latin1
charset = utf8
# Allow connections Atlas Client side IP, It can be precise IP, It can also be IP paragraph , Separated by commas , If this item is not set, all IP Connect , Otherwise, only... In the list is allowed IP Connect
#client-ips = 127.0.0.1, 192.168.1
#Atlas It's on the front LVS Of the physical network card IP( Notice that it's not empty IP), If you have any LVS And set up client-ips Then this item must be set , Otherwise, you can not set
#lvs-ips = 192.168.1.1 Last , Enter into bin Under the folder , start-up Altas
./mysql-proxy --defaults-file=../conf/test.cnf
It is best to configure the daemon Set to true, Run for background daemon .
Using the official website
./mysql-proxyd
test
start
see Altas Operation of the
./mysql-proxyd
test status
There are two processes .
I later used NaviCat Connect work port , The user name and password are the administrative user and password of the above configuration file , succeed .
After testing ,Altas The read-write separation and transaction support are very good , Release tomorrow 2.0 edition , Add to JDBC Support for .
Reference resources :
https://github.com/Qihoo360/Atlas
边栏推荐
- Introduction to using 51 single chip microcomputer to control steering gear
- 【算法篇】四种链表总结完毕,顺手刷了两道面试题
- Types of waveguides
- Teach you a learning method to quickly master knowledge
- Container common commands
- Review 2021, embrace change and live up to Shaohua
- ADB devices cannot detect the problem of Xiaomi note 3
- CVPR 2022丨特斯联AI提出:基于图采样深度度量学习的可泛化行人重识别
- Pointer understanding
- Message queue ten questions
猜你喜欢
Map reduce case super detailed explanation
Pycharm----xx. So cannot open shared object file problem solving
Review 2021, embrace change and live up to Shaohua
Visualization of provincial GDP with CSV metabase processing
Finally understand science! 200 pictures to appreciate the peak of human wisdom
Cesium-1.72 learning (deploy offline resources)
Policy Center > Google Play‘s Target API Level Policy
服务端测试工程师面试经验
Talk about why I started technical writing
深入理解.Net中的线程同步之构造模式(二)内核模式1.内核模式构造物Event事件
随机推荐
容器常用命令
At the beginning of the 2022 new year, I will send you hundreds of dry articles
'<', hexadecimal value 0x3C, is an invalid 问题解决
Management joint examination - mathematical formula
How does sd-rtn ensure the high availability of RTE services after infrastructure failure
Openresty built in variable
How to browse mobile web pages on your computer
iMeta | 叶茂/时玉等综述环境微生物组中胞内与胞外基因的动态穿梭与生态功能...
Pointer understanding
Simulation of two-color ball system to judge the winning situation
Policy Center > Google Play‘s Target API Level Policy
Single cycle CPU of the design group of West University of Technology
KDD 2022 | 我们离通用预训练推荐模型还有多远?推荐系统的通用序列表示学习模型 UniSRec
《你的灯亮着吗》开始解决问题前,得先知道“真问题”是什么
4.1 print function
ASP. Net core signalr series hub tutorial
Experiment of the planning group of the West University of technology -- pipeline CPU and data processing Adventure
Parameter optimization - bias and variance
消息队列十连问
Flask Sqlalchemy - how to use custom query criteria ---orm (7)