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