介绍
小编给大家分享一下如何解决磁盘写满导致MySQL复制失败的问题,相信大部分人都还不怎么了解,因此分享这篇文章给大家参考一下,希望大家阅读完这篇文章后大有收获、下面让我们一起去了解一下吧!
案例场景
,,,,今天在线上发现一个问题,由于监控没有覆盖到,某台机器的磁盘被写满了,导致线上MySQL主从复制出现问题。问题如下:
localhost。(没有)祝辞show slave 地位\ G * * * * * * * * * * * * * * * * * * * * * * * * * * *,1只row * * * * * * * * * * * * * * * * * * * * * * * * * * * ,,,,,,,,,,,,,,Slave_IO_State: ,,,,,,,,,,,,,,,,,Master_Host: 10. xx.xx.xx ,,,,,,,,,,,,,,,,,Master_User:复制品 ,,,,,,,,,,,,,,,,,Master_Port: 5511 ,,,,,,,,,,,,,,,Connect_Retry: 60 ,,,,,,,,,,,,,Master_Log_File: ,,,,,,,,,Read_Master_Log_Pos: 4 ,,,,,,,,,,,,,,Relay_Log_File: relay-bin.001605 ,,,,,,,,,,,,,,,Relay_Log_Pos: 9489761 ,,,,,,,Relay_Master_Log_File: ,,,,,,,,,,,,Slave_IO_Running:没有 ,,,,,,,,,,,Slave_SQL_Running:没有 ,,,,,,,,,,,,,,,,,,Last_Errno: 13121 ,,,,,,,,,,,,,,,,,,Last_Error:, Relay log read 失败:,Could not parse Relay log event 条目只 从而possible reasons 是:,从而掌握# 39;s binary log is corrupted 你还要check 却;能够by running & # 39;mysqlbinlog& # 39;,提醒,binary 日志),,,奴隶# 39;s relay log is corrupted 你还要check 却;能够by running & # 39; mysqlbinlog& # 39;,提醒,relay 日志),a network 问题,,,server was unable 用fetch ,keyring key  required 用open an encrypted relay log 文件,或是a bug 拷贝,大师# 39;s 或是 奴隶# 39;s MySQL 代码只If 你want 用check 从而掌握# 39;s binary log 或是奴隶# 39;s relay 日志,, 你will be  able 用知道their names by issuing & # 39; SHOW SLAVE 状态# 39;,提醒却;能够奴隶。
于是查看错误日志,发现错误日志中的内容如下:
2021 - 03 - 31 t11:34:39.367173 + 08:00 11,[警告],[我- 010897],[Repl], Storing MySQL user name 或是 password 方式;拷贝,master info repository is not secure 以及is therefore not 建议只Please consider  using 从而USER 以及PASSWORD connection options for START 奴隶,, 阅读,& # 39;START  SLAVE 语法# 39;,拷贝,MySQL Manual for more 信息。 2021 - 03 - 31 t11:34:39.368161 + 08:00 12,(错误),[我- 010596],[Repl], Error reading relay log event for  channel & # 39; & # 39;:, binlog truncated 拷贝,middle of 事件;,consider out of disk 空间 2021 - 03 - 31 t11:34:39.368191 + 08:00 12,(错误),[我- 013121],[Repl], Slave SQL for channel & # 39; & # 39;:, Relay log read 失败:Could not parse relay log event 条目只,possible reasons 是:,从而掌握# 39;s binary log  is corrupted (你还要check 却;能够by running & # 39; mysqlbinlog& # 39;,提醒,binary 日志),,, 奴隶# 39;s  relay log  is corrupted (你还要check 却;能够by running & # 39; mysqlbinlog& # 39;,提醒,relay 日志), ,a network 问题,从而server was unable 用fetch a keyring key required 用open an 加密 null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null如何解决磁盘写满导致MySQL复制失败的问题