MySQL 复制和主服务器崩溃恢复
场景:
我们有一个 mySQL 主数据库 [30 GB],有 5 个从数据库[部分],用于不同的目的。 昨天innodb崩溃了。自动崩溃恢复不起作用,因为每次写入操作服务器都会再次崩溃。因此,我使用 innodb_force_recovery 4 启动服务器,并转储整个数据库,然后恢复到新的数据库服务器中。整个过程花了我5个多小时,因为数据恢复非常慢。
问:
现在我正在寻找一些恢复时间最快的解决方案。我可以让另一台服务器与主服务器进行复制,但不确定如何在主服务器崩溃的情况下替换它来代替主服务器。
非常感谢您的时间和帮助。
Scenario:
We have a mySQL master DB [30 GB] with 5 slaves[partial] that are being used for different purposes.
Last day innodb crashed. Auto crash recovery did not work as on every write operation the server was getting crashed again. So I started the server with innodb_force_recovery 4 and took a dump of the whole DB and then restored into a new database server. This whole process took me over 5 hours as the data restoration was very slow.
QUestion:
Now I am looking for some solution in which the recovery time is quickest. I can have another server in replication with master but not sure how I will replace that in place of the master in case of master crashes.
Thank you so much for your time and help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Percona 的好读物:改善 InnoDB 恢复时间
Good read from Percona: Improving InnoDB recovery time