系统崩溃后,mysql事务会回滚吗? [英] Will mysql transactions rollback after system crash?

查看:749
本文介绍了系统崩溃后,mysql事务会回滚吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的问题主要是:如果系统在执行mysql事务时崩溃了,系统重启后事务会回滚吗?

My question baliscally is: if the sytem crashes right when a mysql transaction is executed, will the transaction rollback after system restart?

mysql如何执行事务?

How are the transactions executed by mysql?

重启后,MySQL是否会检查未完成的事务?

Will MySQL check for unfinished transactions after restart?

之所以问这个问题,是因为我用php制作了一个交易系统,但是我没有将最终结果存储在任何地方,以防将来系统崩溃时回滚...

I'm asking this because I made a transaction system in php, but I'm not storing the final results anywhere for a future rollback in case of a system crash...

推荐答案

有不同类型的崩溃. MySQL服务器可能崩溃(如将其杀死),或者整个操作系统可能崩溃(如将计算机拔出电源).

There are different kind of crashes. The MySQL server can crash (like if you kill it) or the whole Operating system can crash (like if you unplug the machine).

您应该从哪里开始阅读有关 二进制日志 及其工作方式以及 InnoDB引擎的恢复过程

Where you should start reading is about the Binary Log and how it works and about the Recovery process for InnoDB engine

这篇关于系统崩溃后,mysql事务会回滚吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆