What are the working modes of binlog? Introduction to Linux cloud computing operation and maintenance

  Linux operation and maintenance is one of the more popular professional positions. More and more people are learning Linux technology. What is the meaning of binlog in the learning process of Linux operation and maintenance? What are the working modes of binlog? What are the advantages and disadvantages? What are the enterprise usage scenarios for binlog? It is what needs to be understood in operation and maintenance learning.
  What is the meaning of binlog?
  Binlog is used to record all operation statements that have updated data. The statements are stored in the form of events, which describe the process of data changes.
  The role of binlog is to back up data in real time, master-slave replication of the database.
  log_bin turns on the binlog function; binlog deletion can be divided into automatic and manual deletion.
  What are the working modes of binlog? What are the advantages and disadvantages?
  Row level mode: the
  log will record the form of each row of data being modified, and then modify the same data on the slave side.
  Advantages: You can not record the information related to the context of executing the SQL statement, only record which piece of data has been modified and what type of modification. the
  drawback: All statements executed both when recording to a log file, and will be recorded to modify each row of record, will produce large amounts of log contents
  statement mode:
  each a modified data in SQL will be recorded master of bin-log in, When the slave is replicating, the SQL process will be parsed into the same SQL executed by the original master to execute it.
  Advantages: It solves the shortcomings of the upper row level mode, does not need to record the changes of each row of data, reduces the amount of logs, and can achieve high performance
  Disadvantages: Since the execution statement is recorded, there will be a problem of master-slave replication in this mode.
  Mixed automatic mode:
  MYSQL will distinguish the log format to be recorded according to each specific SQL statement executed.
  What are the enterprise usage scenarios for binlog?
  1) If you do not use the special functions of mysql, they are basically the default mode statement mode.
  2) If you can use some of the special functions of mysql, you will basically use the row level mode. The
  above is about "What is the meaning of binlog? binlog What are the working modes? What are the advantages and disadvantages? What are the enterprise usage scenarios of binlog?"

Guess you like

Origin blog.51cto.com/7681914/2592282