In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains the "mysql 5.7+keepalived master-slave switching steps are how", the article explained the content is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in-depth, together to study and learn "mysql 5.7+keepalived master-slave switching steps is how" it!
Log in to the slave library:
Mysql > stop slave
Mysql > show slave status
Mysql > reset slave all
Mysql > show master status; records the log_file and log_ poss values of the slave library at this time
Log in to the main library:
Modify / etc/keepalived/keepalived.conf file
Change priority 101 to priority 99 and confirm that the priority value of the master library is lower than that of the slave library.
# / etc/init.d/keepalived stop
Confirm whether the virtual IP has drifted past on the slave library, and confirm with the ip address command
And then
Mysql > change master to master_host=' from the library ip',master_user='slave',master_password='123456',master_log_file=' the log_file',master_log_pos= recorded by the library at that time, the log_ pos value recorded by the library at that time, master_connect_retry=10
Start slave
Show slave status
Start keepalived:
# / etc/init.d/keepalived start
Thank you for your reading, the above is the content of "what is the master-slave switching step of mysql 5.7+keepalived". After the study of this article, I believe you have a deeper understanding of how the master-slave switching step of mysql 5.7+keepalived is, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
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.