First, the mysql binary log file
2. View binary log file information:
1. Check whether the binary log file is enabled: 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 (the last one): show master status ;
4. Get the latest log file command: flush logs . An up-to-date log file is regenerated.
5. Clear the current binary log command: reset master. Delete the current log file every time it is executed, one file at a time.
6. View the contents of the binary log file: mysqlbinlog command + specify the path of the binary file to be viewed;
Three, log-bin log configuration:
1. Specify a unique server-id: server-id = 1314520 . Randomly specify a string that cannot have the same name as other machines in the cluster. If there is only one machine, you can specify it casually.
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 that the path must be under the direct path below the datadir path, the path is unique.
Fourth, use the binary log file to restore data:
1. Point-in-time recovery using event time: