问题背景
最近在运维 MySQL 中遇到一个神奇的问题,分享给大家。现象是这样的,show binary logs
没有返回结果,flush binary logs
后也不行, 但是 binlog 是正常工作的,show master staus
是有输出的。
mysql> show binary logs;
Empty set (0.00 sec)
mysql> show master status\G
*************************** 1. row ***************************
File: master-bin.000004
Position: 120
Binlog_Do_DB:
Binlog_Ignore_DB:
Executed_Gtid_Set:
1 row in set (0.00 sec)
mysql> show binary logs;
Empty set (0.00 sec)
mysql> show master status\G
*************************** 1. row ***************************
File: master-bin.000004
Position: 120
Binlog_Do_DB:
Binlog_Ignore_DB:
Executed_Gtid_Set:
1 row in set (0.00 sec)
mysql> flush binary logs;
Query OK, 0 rows affected (0.01 sec)
mysql> show binary logs;
Empty set (0.00 sec)
mysql> show master status\G
*************************** 1. row ***************************