We have Master
and Slave
Replication running since 2 year and today we found slave
disk if full and mysql process is dead (because disk is full and not able to start back). I have found we have tons of bin
file on Master
mysql> show binary logs;
+------------------+------------+
| Log_name | File_size |
+------------------+------------+
| mysql-bin.000001 | 673 |
| mysql-bin.000002 | 1511 |
| mysql-bin.000003 | 314113849 |
| mysql-bin.000004 | 73402521 |
| mysql-bin.000005 | 125 |
| mysql-bin.000006 | 5681 |
| mysql-bin.000007 | 125 |
| mysql-bin.000008 | 1529 |
| mysql-bin.000009 | 772739549 |
| mysql-bin.000010 | 40635 |
| mysql-bin.000011 | 16928499 |
| mysql-bin.000012 | 159269 |
| mysql-bin.000013 | 9481 |
| mysql-bin.000014 | 58169 |
| mysql-bin.000015 | 301881886 |
| mysql-bin.000016 | 217 |
| mysql-bin.000017 | 217 |
| mysql-bin.000018 | 3533 |
| mysql-bin.000019 | 323644264 |
| mysql-bin.000020 | 1073741894 |
| mysql-bin.000021 | 1073741962 |
| mysql-bin.000022 | 1073742126 |
| mysql-bin.000023 | 1073742901 |
| mysql-bin.000024 | 1073742080 |
| mysql-bin.000025 | 1073742064 |
|
|...output..omitted..
|
| mysql-bin.000120 | 1073742253 |
| mysql-bin.000121 | 1073742378 |
| mysql-bin.000122 | 1073741927 |
| mysql-bin.000123 | 1073743016 |
| mysql-bin.000124 | 478325517 |
+------------------+------------+
124 rows in set (0.01 sec)
Question:
- is it safe to delete
bin
file on master and try re-sync? - or should i remove
bin
file on slave and try to bring back slave machine back? - what would be the best step to bring back slave in working condition?