only saved the latest 2 binary log files
Hi, I met strange thing, please help to check, thanks very much. I not configured expire_logs_days at configuration file /etc/my.cnf.d/server.cnf, and get value=0 (default) thru checking “show variables like 'expire_logs_days';” why only saved the latest 2 binary log files if master and salve sync normal ? and why all binary log files will always be saved if replication error happen ?
MariaDB [(none)]> status -------------- mysql Ver 15.1 Distrib 10.3.11-MariaDB, for Linux (x86_64) using readline 5.1
MariaDB [(none)]> show variables like '%log_bin%'; +---------------------------------+----------------------------------------------+
Variable_name | Value |
+---------------------------------+----------------------------------------------+
log_bin | ON |
log_bin_basename | /appdata/mysql/xxxx-0-bin |
log_bin_compress | OFF |
log_bin_compress_min_len | 256 |
log_bin_index | /appdata/mysql/xxxx-0-bin.index |
log_bin_trust_function_creators | OFF |
sql_log_bin | ON |
+---------------------------------+----------------------------------------------+ 7 rows in set (0.003 sec)
MariaDB [(none)]> show master status\G; ***** 1. row ***** File: xxxx-0-bin.000003 Position: 84488115 Binlog_Do_DB: Binlog_Ignore_DB: 1 row in set (0.002 sec)
ERROR: No query specified
MariaDB [(none)]> show binary logs\G; ***** 1. row ***** Log_name: xxxx-0-bin.000002 File_size: 1073741902 ***** 2. row ***** Log_name: xxxx-0-bin.000003 File_size: 84545824 2 rows in set (0.003 sec)
ERROR: No query specified
MariaDB [(none)]>
[root@xxxx-0 ]# ls -l /appdata/mysql/ total 1341236 ...... -rw-rw----. 1 mysql mysql 1073741902 Feb 22 05:25 xxxx-0-bin.000002 -rw-rw----. 1 mysql mysql 106483175 Feb 22 11:39 xxxx-0-bin.000003 -rw-rw----. 1 mysql mysql 66 Feb 22 11:15 xxxx-0-bin.index ...... [root@xxxx-0 ]# [root@xxxx-0 ]# cd /appdata/mysql/ [root@xxxx-0 mysql]# cat xxxx-0-bin.index ./xxxx-0-bin.000002 ./xxxx-0-bin.000003 [root@xxxx-0 mysql]#
br David