In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article introduces the relevant knowledge of "how to deal with emergency after database failure". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
There are multiple data sources in the project, one master and multiple slaves, using druid connection pool, but when database failure is found, druid can not automatically rule out unavailable connections, but can only modify the program. Moreover, even if the failed library is restored, druid will still continue to report errors. Some people say that adding automatic reconnection parameters to the database connection will not work. If the master library fails, it is understandable that the service is unavailable because there is only one master library, but the slave library is generally read-only. If one of the slave libraries fails, can it automatically discover whether the service is available like eureka or zookeeper, and then deal with it accordingly?
The following is a record of how to restore the service after simulating a database failure
1. Slave library failure: remove the library data source directly from the program, and then restart the service
two。 Main library failure: the failure of the main library is a little more troublesome. First of all, you need to check all the Read_Master_Log_Pos synchronized from the library and select the largest one as the master library, then clear the master information of the slave library, configure the slave library to become master, and finally modify the master information of the rest of the slave library. When you are finished, reset the main library in the program, and then restart. The reference to the main library failure is the https://www.cnblogs.com/QicongLiang/p/9959276.html post.
This is the end of the content of "how to deal with emergency after database failure". Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.