Home  >  Q&A  >  body text

linux - 故障发生后如何确保mysql数据不丢失?

如题,
最近遇到了一个问题,mysql数据库损坏,最后通过myisamchk修复的。

有个疑问,
mysql数据库的定时备份只是用来做大型突发事件的事后处理,
并且会丢失从最后一次备份到事故发生的数据,

目前已知的办法是mysql主从备份,
请问除了这个之外,有没有什么办法实现完全不丢失数据?

= =

结语:
虽然本问说的是小公司、小作坊的解决方案,例如几百人到几千人的discuz论坛,
但是确实如murmur所回答的那样,也和正常的认知一样,完美的解决方案是钱砸出来的。

除此之外,对于小的作坊来说,innodb和自己搞事务处理也是可以的。

天蓬老师天蓬老师2743 days ago744

reply all(2)I'll reply

  • PHP中文网

    PHP中文网2017-04-17 11:51:28

    Log recovery is definitely possible and theoretically meaningful Completely without losing data. MySQL probably can’t do it, at least it has to be at Oracle level (why don’t banks use MySQL)?
    In addition, you have to spend a lot of money on hardware. Even if two nodes in your hot backup fail at the same time, it is not impossible. In this case, the best server, two power supplies, and the computer room must be specially designed
    In short, it’s just two words: throw money

    I just thought of the word "complete" and there is still a problem
    Even if the bank spends so much money, for the so-called completeness, don’t you still have paper records for every cash operation at a business outlet?
    In terms of reliability, don’t look down on state-owned enterprises. The reliability is all made with money. The Internet is worse, especially online games. If you have to go down every three days, you will have to line up at the bank to file a lawsuit.

    In addition, it is said that the bank’s data is backed up in three places. It is three computer rooms and they are separated into two places. Now think about how stable your so-called master-slave mysql can achieve

    reply
    0
  • 巴扎黑

    巴扎黑2017-04-17 11:51:28

    Innodb log-bin recovery

    reply
    0
  • Cancelreply