当前位置:网站首页>MHA switching (recommended operation process)
MHA switching (recommended operation process)
2022-06-26 16:06:00 【franket】
Preface
If used mha structure mysql colony , For various reasons, you may encounter the need to migrate
So let's share that mha Switch The process of
Tip: current version MHA Manager 0.56
Summary
Checklist
Be sure to check the database status before switching , Here is a checklist :
1. All node databases must be running properly
2. All standby database replications must point to the primary database , And the replication status is normal (io , sql Process status ok )
3. The standby database is in replication status Seconds_Behind_Master Parameter cannot be greater than 3 Second
4. In the current situation keepalived Work well ,master get VIP, The candidate master On keepalived The operating state of is normal , And priority ratio master low
5. Database relay_log_purge The parameters are off , Otherwise, there will be potential loss relay log The risk of
6. Except the main library , On other standby databases read_only The parameters are on , Otherwise, there is a risk that the primary and standby databases are inconsistent
Manual switching operation manual
1. Turn off the background switch monitoring masterha_stop --conf=/etc/app1.cnf
2. Check the running status of the database
3. Check database parameters
4. Check keepalived Working state ,ip Mounting situation
5. Record to be cut slave( The candidate master) Of binlogfile and position( For subsequent synchronization )
6. Conduct repl check
7. Implement switching
8. Status check (mysql,keepalived, Parameters , sync )
9. system maintenance , Database maintenance
10. Primary backup synchronization ( The same as before slave position)
11. Add the maintained database to mha colony
12. Check the running status of the database
13. Check database parameters
14. modify keepalived.conf file , Lower the priority , Make it different from the current master master Scramble for ip
15. start-up keepalived, Check ip, Check keepalived Running state
16. Record to be cut slave( The candidate master, primary master) Of binlogfile and position( For subsequent synchronization )
17. Conduct repl check
18. Implement switching
19. recovery mha framework ( Refer to the previous steps )
20. Back office mha monitor
21. Monitor and observe
Command summary
masterha_check_ssh --conf=/etc/app1.cnf
masterha_check_status --conf=/etc/app1.cnf
masterha_stop --conf=/etc/app1.cnf
masterha_check_repl --conf=/etc/app1.cnf
nohup masterha_manager --conf=/etc/app1.cnf --ignore_last_failover &
masterha_master_switch --master_state=alive --conf=/etc/app1.cnf --new_master_host=m1 --interactive=0
purge_relay_logs --user=root --password=xxxx --workdir=/data/relay_tmp/
show slave status\G
show master status;
show variables like 'relay_log_purge';
show variables like 'read_only';
Original address
边栏推荐
- 现在券商的优惠开户政策是什么?现在在线开户安全么?
- I want to know how to open an account through online stock? Is online account opening safe?
- 零知识 QAP 问题的转化
- R语言plotly可视化:小提琴图、多分类变量小提琴图、分组(grouped)小提琴图、分裂的分组小提琴图、每个小提琴图内部分为两组数据、每个分组占小提琴图的一半、自定义小提琴图的调色板、抖动数据点
- 简单科普Ethereum的Transaction Input Data
- Svg capital letter a animation JS effect
- Quickly get started with federal learning -- the practice of Tencent's self-developed federal learning platform powerfl
- JVM notes
- Anaconda3安装tensorflow 2.0版本cpu和gpu安装,Win10系统
- NFT transaction principle analysis (2)
猜你喜欢

Solana扩容机制分析(1):牺牲可用性换取高效率的极端尝试 | CatcherVC Research

canvas三个圆点闪烁动画

Anaconda3 installation tensorflow version 2.0 CPU and GPU installation, win10 system

NFT transaction principle analysis (1)

Simple use of tensor

svg canvas画布拖拽

人人都当科学家之免Gas体验mint爱死机

NFT交易原理分析(1)

Development, deployment and online process of NFT project (2)

今年高考英语AI得分134,复旦武大校友这项研究有点意思
随机推荐
R language uses cor function to calculate the correlation matrix for correlation analysis, uses corrgram package to visualize the correlation matrix, reorders rows and columns using principal componen
NFT transaction principle analysis (1)
Leetcode one week race 298, first three questions
PCIe Capabilities List
Redis 迁移(操作流程建议)1
【蓝桥杯集训100题】scratch辨别质数合数 蓝桥杯scratch比赛专项预测编程题 集训模拟练习题第15题
11 cnn简介
基于 MATLAB的自然过渡配音处理方案探究
简单科普Ethereum的Transaction Input Data
油田勘探问题
TweenMax+SVG切换颜色动画场景
理想路径问题
Ten thousand words! In depth analysis of the development trend of multi-party data collaborative application and privacy computing under the data security law
C. Inversion Graph
3 keras版本模型训练
R language plot visualization: plot visualizes the normalized histogram, adds the density curve KDE to the histogram, and uses geom at the bottom edge of the histogram_ Adding edge whisker graph with
Canvas three dot flashing animation
Development, deployment and online process of NFT project (2)
股票开户优惠链接,我如何才能得到?在线开户安全么?
SAP OData 开发教程 - 从入门到提高(包含 SEGW, RAP 和 CDP)