問題背景
最近在運維 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 ***************************
File