In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
MySQL's MHA+keepalived+ load balancing + read-write separation architecture
MHA only ensures database consistency, but keepalived, middleware and lvs are needed to realize fixed entry, read-write separation and load balancing of application access.
How to recover the binary log manually
Show master logs / / View all binary logs
Flush logs;// swipes the log.
Mysqlbinlog / data/mysql/mysql-bin.000002 / / View the contents of the document
Note: if the local mysqlbinlog does not recognize the default-character-set=utf8 in the binlog configuration
So you can add-no-defaults to the command to make it work, and we all take it as a warning.
Restore:
Mysqlbinlog-no-defaults-stop-datetime='2017-04-11 09:48:48'/data/mysql/mysql-bin.000001 | mysql- uroot-p123456
Mysqlbinlog / var/lib/mysql/mysql-bin.000006-- start-position=351-- stop-position=632 | mysql- uroot-pwolf-h292.168.1.106
2. MHA+keepalived to achieve real high availability
Reference: http://blog.csdn.net/yabingshi_tech/article/details/55509269
Keepalived is usually used to prevent cluster failure caused by a single point of failure. In this example, keepalived is mainly used to prevent a single point of failure. One is to prevent a single point of failure, and the other is to separate read and write with two vip. For configuration, please see step 3.
Separation of reading and writing
There are two ways to separate reading and writing, one is to use keepalived, two ip are used externally, corresponding to write vip, and the other is to read vip; using middleware, which is an external ip.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.