728x90


MariaDB [(none)]> show global variables like '%expire%';
+------------------+-------+
| Variable_name    | Value |
+------------------+-------+
| expire_logs_days | 7     |
+------------------+-------+
1 row in set (0.001 sec)

MariaDB [(none)]> show binary logs;
+------------------+------------+
| Log_name         | File_size  |
+------------------+------------+
| mysql-bin.000077 | 1073742455 |
| mysql-bin.000078 | 1073742613 |
| mysql-bin.000079 | 1073742043 |
| mysql-bin.000080 |  714294090 |
+------------------+------------+
4 rows in set (0.000 sec)

MariaDB [(none)]> purge binary logs to 'mysql-bin.000079';
Query OK, 0 rows affected (0.634 sec)

MariaDB [(none)]> show binary logs;
+------------------+------------+
| Log_name         | File_size  |
+------------------+------------+
| mysql-bin.000079 | 1073742043 |
| mysql-bin.000080 |  714294090 |
+------------------+------------+
2 rows in set (0.000 sec)

MariaDB [(none)]> exit
Bye


[maria@db binary]$ ll
total 1750224
-rw-rw---- 1 maria maria 1073742043 Jun  9 10:03 mysql-bin.000079
-rw-rw---- 1 maria maria  714703482 Jun 17 10:00 mysql-bin.000080
-rw-rw---- 1 maria maria         70 Jun 17 10:00 mysql-bin.index

728x90

'MYSQL' 카테고리의 다른 글

ERROR 1143  (0) 2024.06.24
mysqldump: Error 1194  (0) 2024.06.24
REPLICATION ERROR 1062  (0) 2024.02.21
TABLE, INDEX, 권한 조회  (0) 2024.02.21
MYSQL 기동&정지, 서비스 등록, 패스워드 변경  (0) 2024.01.25

+ Recent posts