MySQL binary log file in detail

Source: Internet
Author: User

One, MySQL binary log file

Second, view the binary log file information:

1. Check if binary log file is open: Show variables like ' Log_bin ';

2. View a list of all binary log files: show binary logs;

3. View the name of the current binary log file (last):show Master Status;

4. Get the latest log file command:flush logs. An up-to-date log file is regenerated.

5. Empty current binary log command: RESET Master. Deletes the current log file every time it is executed, deleting one file at a time.

6. View binary log file contents: Mysqlbinlog Command + Specifies the binary file path to be viewed;

Third, the configuration of Log-bin log:

1. Specify a unique Server-id:server-id = 1314520. randomly specify a string that cannot be the same name as the machine in the other cluster, and if there is only one machine, it can be arbitrarily specified.

2, turn on the Binlog function:log_bin = on. Can not.

3, set the value of Log-bin:log-bin=D:\MySQL\Data\igoodfulbinarylog. Note the path must be a path that is unique under the direct path below the DataDir path.

Iv. recovering data using a binary log file:

1. Point-in-time recovery using event time:

MySQL binary log file in detail

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.