昨天一次插入 10W 条记录、卡死了怎么办,发现从服务器状态错误,因为中途曾经几次 kill process,现在数据没有同步,状态也不对了!
20230818 又一次处理 unblock with ‘mysqladmin flush-hosts’
之前怎么会处理的那么复杂?
-
许久不查看 replica,今天查看的时候发现错误了
Last_IO_Error: Error reconnecting to source '[email protected]:3306'. This was attempt 2077/86400, with a delay of 60 seconds between attempts. Message: Host '192.168.0.195' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'
-
处理方法
提示信息中已经告知处理方法 : unblock with ‘mysqladmin flush-hosts’
我还傻乎乎转了一圈1). 在 master mysql> flush hosts; Query OK, 0 rows affected, 1 warning (0.08 sec) 2). 在 replica 确认一下能否连接上 master $ mysql -h192.168.0.XXX -uroot -p 3). 在 replica ,无需重新启动 replica 直接查看 mysql> show replica status \G; OK
处理 unblock with ‘mysqladmin flush-hosts’
-
错误信息:
Last_IO_Error: Error connecting to source ‘[email protected]:3306’. This was attempt 1/86400, with a delay of 60 seconds between attempts. Message: Host ‘192.168.0.103’ is blocked because of many connection errors; unblock with ‘mysqladmin flush-hosts’
mysql> show replica status\G; *************************** 1. row *************************** Replica_IO_State: Connecting to source Source_Host: 192.168.0.101 Source_User: repl Source_Port: 3306 Connect_Retry: 60 Source_Log_File: binlog.000001 Read_Source_Log_Pos: 30115639 Relay_Log_File: ubuntu2004-103-relay-bin.000004 Relay_Log_Pos: 30111997 Relay_Source_Log_File: binlog.000001 Replica_IO_Running: Connecting Replica_SQL_Running: Yes ...... Last_IO_Errno: 1129 Last_IO_Error: Error connecting to source '[email protected]:3306'. This was attempt 1/86400, with a delay of 60 seconds between attempts. Message: Host '192.168.0.103' is bloc