• MySQL Server Administration
    • The MySQL Server
      • Server System Variables

secure_file_priv

This variable is used to restrict data import and export operations, for example:

  1. LOAD_DATA statement
  2. SELECT … INTO OUTFILE statement
  3. The LOAD_FILE () statement
  • The InnoDB Storage Engine
    • InnoDB Startup Options and System Variables

innodb_flush_log_at_trx_commit

Parameter action: Control strictly follows a balance between ACID and high performance. .

Before you read the text below, you can understand this.

MySQL logs can be viewed in two parts:

  1. Write: Write data from the log buffer to the disk memory map (an area managed by the OS)
  2. Flush: Flush the data mapped to the disk

This parameter can be 0, 1, or 2.

innodb_flush_log_at_trx_commit = 1

This is the default mode, strictly ACID compliant.

MySQL executes write + flush every time a transaction commits.

This mode is the safest, but also the slowest. In the case of a mysqld service crash or a server host crash, the Binary log can only lose at most one statement or transaction. If autoCOMMIT = 1, a statement is missing.

innodb_flush_log_at_trx_commit = 0

MySQL executes write + flush once per second. In this mode, writing to disks is not actively triggered when a transaction is committed.

This mode is the fastest, but less secure, as a mysqld process crash or an operating system crash can result in the loss of all transaction data in the last second.

innodb_flush_log_at_trx_commit = 2

MySQL performs write on each transaction commit, but flush is performed at a rate of once per second.

This mode is faster and more secure than 0, and only in the case of an operating system crash or system power failure, all transaction data can be lost in the last second.

Relevant information can be viewed:

About Linux synchronous IO:blog.csdn.net/zhouxinlin2…

Reference: blog.csdn.net/u010833547/…

innodb_log_buffer_size