MySQL Log classification

Source: Internet
Author: User

Binlog, redo log, undo log, relay log just start to learn that all kinds of log is what exactly do not understand:


Binlog: For logical replication and possible incremental backup recovery strategies, only log changes to the data, recording mode there are three kinds of row, statement, Mixed,binlog within the MySQL internally coordinated internal XA role.


Redo Log:the Redo Log is a disk-based data structure used during crash recovery to correct data written by incomplete Tran The sactions redo log is also called the transaction log, which records data page physical modification records for downtime to recover data that was not flushed to the hard disk. Redo log is written by default by 2 file files (ib_logfile0,ib_logfile1), in which the checkpoint is also recorded, when the recovery is only to restore less than checkpoint log, the default two file size sum of 48M, Maximum support 512G, can be configured innodb_log_file_size parameter modification size, can also change the Innodb_log_group_home_dir parameter to put redo log in the specified location, you can make reasonable use of different disk IO.


Undo log: Generally called rollback log, including undo log and rollback segment, record a transaction before the modification of the record, that is used for transaction rollback also has a consistent non-lock read role, consistent non-lock read is InnoDB multi-versioning mode, Reads data from the current execution time database row and is not affected by the fine update, delete, that is being done to the data.


Relay log: Relay log, master-slave io_thread read master send Binlog convert to the statements that can be executed in relay log, Sql_thread Read and Execute

This article is from the "Eye Brother" blog, please be sure to keep this source http://2364914.blog.51cto.com/2354914/1755216

MySQL Log classification

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.