mysql二进制日志记录顺序
大家讲道理
大家讲道理 2017-04-17 11:47:48
0
1
491

mysql启用二进制日志binlog,会对数据库的每个操作记录形如mysql-bin.000001的日志文件中,问题是它是先记录日志再修改数据库,还是修改完数据库后再记录到日志。

大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

reply all(1)
Peter_Zhu

If the record here means persisting to disk, it depends on the configuration sync_binlog of my.cnf
However, if you don’t want to lose data after the server crashes, sync_binlog still needs to be enabled.
Therefore, in scenarios where data loss cannot be tolerated, operations will be persisted to the binary log first. After all, log writing is sequential, and the impact on performance is still acceptable.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!