mysql closes the binlog log and deletes the binlog data (common to win and linux)

Mysql closes binlog log process

  1. Open the mysql command window and check whether binlog is enabled.

     

(ON) is in the open state (OFF) is in the closed state. If it is in the open state, you need to modify the configuration file, otherwise no operation is required.

show variables like 'log_bin';
  1. Open my.ini under the path C:\ProgramData\MySQL\MySQL Server 8.0 and comment out the bin-log configuration item and add skip-log-bin after it.

 

skip-log-bin
  1. Restart mysql service

 

  1. Open the mysql command window and query the binlog status. It is (OFF) closed status.

  1. If you need to delete the previous binlog log file data, open the command window and execute the command

# 删除binlong文件数据 
reset master; 
# 查询现在是否有binlog记录,如果输出为 Empty set (0.00 sec) ,则表示已经没有 binlog 
记录
 show master status;

Guess you like

Origin blog.csdn.net/weixin_53053517/article/details/131918548