1, check whether to open the Binlog:show binary logs;
It is not turned on by default.
2. Turn on Binlog: Modify the MySQL configuration file My.ini. Add the following configuration:
The file is not allowed to be modified by default, and you need to right-click "Administrator takes ownership" before saving changes.
Also, be aware that the My.ini in the figure is located in: C:\ProgramData\MySQL\MySQL Server 5.7, not in: C:\Program files\mysql\mysql server 5.7. look at the picture:
3. Restart the MySQL service.
4, verify whether Binlog open: Show variables like ' Log_bin '; and show binary logs;
5. binlog file Location: If the full path is given when modifying the My.ini Binlog, the generated log file is in the specified directory, and if you give only one name in step 2, the location of the generated Binlog log is:
Assume that the given full path is configured as:
After the service restarts, the mysql-bin.000001 and Mysql-bin.index files are generated in the specified directory:
Windows Mysql5.7 Open Binlog steps and considerations