1、开启binlog日志功能
找到mysql安装目录:C:\ProgramData\MySQL\MySQL Server 5.7
编辑my.ini文件,在mysqld下面添加:
重启mysql服务:
![在这里插入图片描述](https://img-blog.csdnimg.cn/20201022142906309.png#pic_center
开启成功:
show variables like 'log_bin';
2、创建一张表并删除,然后binlog恢复。
建表:
CREATE TABLE if not exists test4 (
id <